untitled-4770
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.
Viewing readonly version of main branch: v25View latest version
A real-time messaging application for work groups where team members can register with unique usernames and send messages to keep each other updated.
- User registration with unique usernames
- Real-time messaging within work groups
- Message history with timestamps
- Username display alongside each message
- Simple, clean interface
βββ backend/
β βββ database/
β β βββ migrations.ts # Database schema setup
β β βββ queries.ts # Database query functions
β βββ routes/
β β βββ auth.ts # User registration/login
β β βββ messages.ts # Message CRUD operations
β βββ index.ts # Main Hono server
βββ frontend/
β βββ components/
β β βββ App.tsx # Main app component
β β βββ Login.tsx # Login/registration form
β β βββ MessageList.tsx # Message display
β β βββ MessageForm.tsx # Message input form
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend entry point
βββ shared/
βββ types.ts # Shared TypeScript types
POST /api/auth/register- Register new userPOST /api/auth/login- Login existing userGET /api/messages- Get all messagesPOST /api/messages- Send new message
- id (INTEGER PRIMARY KEY)
- username (TEXT UNIQUE)
- created_at (TEXT)
- id (INTEGER PRIMARY KEY)
- user_id (INTEGER)
- username (TEXT)
- content (TEXT)
- created_at (TEXT)
- Register with a unique username
- Start sending messages to your work group
- View real-time updates from other team members