For Developers
Docs about TeamComms for developers
Last modified: 11/8/2026
Getting Started
Prerequisites
- Node.js 20+
- pnpm
- PostgreSQL database
1. Clone the repository
git clone https://github.com/Ali1raz/team-comms.git
cd team-comms2. Install dependencies
pnpm install3. Configure environment variables
cp .env.example .envFill in your .env:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/team-comms?schema=public"
# Auth
BETTER_AUTH_SECRET=your_secret_here
NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3000
# Email (Nodemailer)
NODEMAILER_USER=your_email@gmail.com
NODEMAILER_APP_PASSWORD=your_app_password
NEXT_PUBLIC_PARTYKIT_HOST=http://localhost:8787
INTERNAL_SECRET=dev-internal-secret
# OAuth
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Security
ARCJET_KEY=your_arcjet_key
ARCJET_ENV=development
# File Uploads
UPLOADTHING_TOKEN=your_uploadthing_token
UPLOADTHING_SECRET_KEY=your_uploadthing_secret_key
# AI (via OpenRouter)
OPENROUTER_API_KEY=your_openrouter_api_key
INNGEST_DEV=14. Set up the database
This updates database and generates types:
pnpm db:syncOptionally seed some starter data:
pnpm db:seed5. Run the development server
Start the Next.js app:
pnpm devTo run inngest server:
update port for this command where your dev server is running:
pnpm inngest:devRealtime runs on Cloudflare Workers (PartyServer), so log in to Wrangler and start the worker alongside Next.js:
# Log in to your Cloudflare account
pnpm dlx wrangler login
# Generate Cloudflare/Wrangler types
pnpm wrangler:types
# Serve the realtime worker locally (run in a separate terminal)
pnpm wrangler:dev- App: http://localhost:3000
- Realtime worker: http://localhost:8787
Database Scripts
# Run Prisma migrations
pnpm db:migrate
# Push schema changes without migration
pnpm db:push
# Regenerate Prisma client
pnpm db:generate
# Push + generate in one step
pnpm db:sync
# Open Prisma Studio
pnpm db:studio
# Seed the database
pnpm db:seedExplore the Codebase
- Directory Structure — high-level map of the project folders.
- Knowledge Graph — query the codebase with graphify.
- Message Architecture — message UI, persistence, and realtime flow.
Contributing
Contributions are welcome. Please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes
- Open a Pull Request