Skip to content

Anderson-Barcellos/CHATGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Celer Chat

Multimodal chat application built with Next.js 16, React 19, TypeScript, Zustand, TanStack Query, and the OpenAI Responses API.

The project focuses on a ChatGPT-like experience with conversation history, reasoning display, model selection, prompt tuning, persistent memory, artifact rendering, and polished mobile/PWA behavior.

Highlights

  • Real-time chat experience with streaming responses
  • Dedicated reasoning panel with explicit state transitions
  • Conversation history with editing and deletion flows
  • Model picker with support for gpt-5.5, gpt-5.3-codex, and gpt-5.3-chat-latest
  • Persistent memory and custom instructions stored server-side
  • Artifact rendering and export flows, including PDF generation
  • Mobile-first shell refinements for Safari and installed PWA usage
  • Local persistence for conversations, memories, and persona bootstrap data

Tech Stack

  • Next.js 16 with App Router
  • React 19
  • TypeScript
  • Tailwind CSS 4
  • Zustand
  • @tanstack/react-query
  • Radix UI
  • OpenAI Node SDK
  • Vitest

Project Structure

app/
  api/
    auth/                Authentication endpoints
    chat/                Server-side OpenAI proxy
    conversations/       Conversation CRUD
    memories/            Memory CRUD
    persona/             Custom instructions endpoint
    transcribe/          Audio transcription endpoint
components/
  artifacts/             Artifact viewers and export entry points
  chat/                  Main chat experience
  layout/                Application shell
  settings/              Persona and memory settings
  sidebar/               Conversation navigation
hooks/
  useChat.ts             Streaming chat orchestration
lib/
  artifacts/             Artifact generation/parsing helpers
  export/                PDF and export utilities
  models/                Model catalog and selector metadata
data/
  conversations.json     Local conversation persistence
  memories.json          Local memory persistence
  persona.json           Persona bootstrap persistence

Current Product Areas

Chat

  • Streaming responses with reasoning state handling
  • Markdown rendering with code, math, and rich formatting support
  • Message actions for editing, exporting, and artifact handling
  • Improved mobile composer behavior and safe-area handling

Sidebar and Navigation

  • Conversation list with clearer active state
  • Safer delete flow for the currently open conversation
  • Shared panel sizing between conversation sidebar and settings drawer

Settings

  • Persona/custom instructions persisted through /api/persona
  • Memory management persisted through /api/memories
  • Inline editing and autosave behavior for settings workflows

Artifacts and Export

  • Right-side artifact panel for document-like outputs
  • PDF export tuned for cleaner layout and OpenAI-branded header
  • Support for document and quiz-oriented artifact rendering

API Endpoints

  • GET/POST /api/chat
  • GET/POST /api/conversations
  • GET/PATCH/DELETE /api/conversations/[id]
  • GET/POST /api/memories
  • PATCH/DELETE /api/memories/[id]
  • GET/PUT /api/persona
  • POST /api/transcribe
  • POST /api/auth/login
  • POST /api/auth/logout
  • GET /api/auth/check
  • GET /api/health

Local Development

Requirements

  • Node.js 20+
  • npm

Install

npm install

Run in development

npm run dev

The development server uses port 3040 by default.

Scripts

npm run dev
npm run build
npm run start
npm run lint
npm test
npx tsc --noEmit

Validation Checklist

Before shipping a change, the repo is typically validated with:

npm test
npm run build
npx tsc --noEmit
npm run lint

Run only the commands that are applicable to the current change if you are doing a narrow, documentation-only update.

Infrastructure Notes

  • The canonical service configuration is documented in systemd/chatgpt.service
  • Additional infrastructure notes live in docs/INFRASTRUCTURE.md
  • If you are also managing Apache or reverse proxy behavior, check the repo's infrastructure docs before changing ports or service bindings

Notes

  • Local JSON files in data/ are used for simple persistence during development and server-side flows
  • The repository also contains project-specific operational guidance in AGENTS.md
  • If you need to adjust the OpenAI model catalog, start with lib/models/modelConfig.ts

About

CHATGPT TWIN PROJECT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors