A modern, real-time chat application with end-to-end privacy
Features β’ Quick Start β’ Deployment β’ Configuration β’ Contributing
- π GitHub OAuth Authentication - Secure sign-in with your GitHub account
- π¬ Real-time Messaging - Instant message delivery with Supabase Realtime
- π₯ Group Chats - Create and manage group conversations
- π Dark Mode - Automatic theme switching based on system preferences
- π± Responsive Design - Works beautifully on desktop and mobile
- π¨ Customizable Avatars - Auto-generated DiceBear profile pictures
- π Static Deployment - Deploy to GitHub Pages or any static host
- Frontend: SvelteKit with TypeScript
- Backend: Supabase (PostgreSQL + Realtime)
- Styling: Bootstrap 5 + Bootstrap Icons + SCSS
- Fonts: Instrument Serif (display) + Outfit (body)
- Node.js 18+
- npm or yarn
- A Supabase account (free tier works)
-
Clone the repository
git clone https://github.com/GoneRogueProductions/dispatchx.git cd dispatchx -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envwith your Supabase credentials:VITE_SUPABASE_URL=https://your-project.supabase.co VITE_SUPABASE_ANON_KEY=your-anon-key
-
Set up the database
Run the SQL in
supabase-setup.sqlin your Supabase SQL Editor. -
Configure GitHub OAuth (optional but recommended)
In your Supabase dashboard:
- Go to Authentication β Providers β GitHub
- Add your GitHub OAuth App credentials
- Set the callback URL to
https://your-domain.com/authenticate/callback
-
Start the development server
npm run dev
-
Enable GitHub Pages
- Go to your repository Settings β Pages
- Source: "GitHub Actions"
-
Create the workflow file
.github/workflows/deploy.yml:name: Deploy to GitHub Pages on: push: branches: ['main'] workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: 'pages' cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: Install dependencies run: npm ci - name: Build run: npm run build env: VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }} VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }} - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: 'build' deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4
-
Add secrets
- Go to Settings β Secrets and variables β Actions
- Add
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEY
-
Push to deploy
git push origin main
- Add a
CNAMEfile to thestaticfolder with your domain - Configure DNS with your domain provider
- Update the
basepath insvelte.config.jsif needed
The build output in /build is a static site that can be deployed to:
- Netlify
- Vercel
- Cloudflare Pages
- Any static file host
| Variable | Description | Required |
|---|---|---|
VITE_SUPABASE_URL |
Your Supabase project URL | Yes |
VITE_SUPABASE_ANON_KEY |
Your Supabase anonymous key | Yes |
BASE_PATH |
Base path for deployment (e.g., /repo-name) |
No |
The supabase-setup.sql file creates the following tables:
rooms- Chat rooms (direct messages and groups)room_participants- Group chat membersmessages- Chat messagesusers- User profiles
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run check # Type-check the codebase
npm run lint # Run linter
npm run format # Format code with Prettiersrc/
βββ lib/
β βββ auth.ts # Authentication helpers
β βββ supabase.ts # Supabase client & types
β βββ fetchIt.ts # HTTP utility
βββ routes/
β βββ +page.svelte # Homepage
β βββ authenticate/ # Auth pages
β βββ chat/ # Chat functionality
β βββ policies/ # Legal pages
β βββ profile/ # User profile
βββ app.html # HTML template
- TypeScript for type safety
- SCSS with Bootstrap variables
- Mobile-first responsive design
- Always support dark mode
See .github/copilot-instructions.md for detailed guidelines.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MPL 2.0 License.
Made with β€οΈ by the Dispatch team