• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
stevekrouse

stevekrouse

last-login-demo-1

Public
Like
1
last-login-demo-1
Home
Code
3
backend
1
frontend
2
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
9/17/2025
Viewing readonly version of main branch: v21
View latest version
README.md

ChatGPT Clone with LastLogin Authentication

A fullstack React + Hono app that lets you chat with ChatGPT, with user authentication and thread history.

Features

  • πŸ” Authentication via LastLogin (Google OAuth)
  • πŸ’¬ Chat with ChatGPT (GPT-4o-mini)
  • πŸ“ Thread-based conversation history
  • πŸ—„οΈ SQLite storage for persistence
  • πŸ“± Responsive design with TailwindCSS

Project Structure

β”œβ”€β”€ backend/
β”‚   └── index.ts             # Main Hono server with API routes
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html           # Main HTML template
β”‚   └── index.tsx            # React frontend app
└── README.md

Current Status: Phase 3 Complete βœ…

Backend Foundation:

  • βœ… Hono app with LastLogin authentication
  • βœ… SQLite schema for threads and messages
  • βœ… Basic API endpoints for threads CRUD
  • βœ… Static file serving for React frontend

Frontend Foundation:

  • βœ… React app with authentication UI
  • βœ… Basic layout with sidebar for threads
  • βœ… Login/logout flow with LoginWithGoogleButton
  • βœ… Thread listing and creation
  • βœ… Responsive design with TailwindCSS

Chat Interface:

  • βœ… Chat message display with user/assistant styling
  • βœ… Message input with textarea and send button
  • βœ… OpenAI API integration (GPT-4o-mini)
  • βœ… Real-time message updates
  • βœ… Loading states and typing indicators
  • βœ… Conversation history context

API Endpoints

  • GET / - Main page (shows login or welcome)
  • GET /api/threads - List user's threads
  • POST /api/threads - Create new thread
  • GET /api/threads/:id/messages - Get messages for thread

Database Schema

Tables:

  • last-login-chat-threads - User chat threads
  • last-login-chat-messages - Individual messages in threads

Next Steps

  • Phase 3: Chat interface with OpenAI integration
  • Phase 4: Thread management and auto-titles
  • Phase 5: Final polish and responsive design

Debug Routes

  • /debug - Check authentication status
  • /api/test-create-thread - Create a test thread (when logged in)
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.