-
Notifications
You must be signed in to change notification settings - Fork 133
Getting Started
FriendAssKicker edited this page Jun 26, 2026
·
1 revision
- Node.js 22 or later
-
pnpm 9.x (
npm install -g pnpm@9) - MongoDB Atlas cluster (or local MongoDB 7+)
- Git
Optional (for full feature set):
- Redis (Upstash or local) -- enables cross-instance caching and document queue
- Discord Developer Application -- enables bot and webhook logging
- Zoom Marketplace App -- enables meeting transcript ingestion
- Google Cloud Storage bucket -- enables image uploads
- Anthropic/OpenAI/XAI API key -- enables AI features
git clone https://github.com/vicharanashala/crowd-source-faq.git
cd crowd-source-faq
pnpm installcp apps/backend/.env.example apps/backend/.envEdit apps/backend/.env and set the required values:
| Variable | Required | Description |
|---|---|---|
MONGODB_URI |
Yes | MongoDB connection string |
JWT_SECRET |
Yes | Min 32 characters. Generate with openssl rand -hex 32
|
PORT |
No | Defaults to 6767
|
NODE_ENV |
No |
development or production
|
CLIENT_URL |
No | Full URL of the frontend (used for Zoom OAuth redirects) |
See Environment Variables for the complete reference.
cp apps/frontend/.env.example apps/frontend/.envFor local development, the frontend .env can be left empty. The Vite dev server proxies API calls to localhost:6767 automatically.
./run.shThis starts both the backend (port 6767) and frontend dev server (port 5173) with hot module reloading.
# Start both
pnpm dev
# Backend only
pnpm dev:backend
# Frontend only
pnpm dev:frontendcd apps/backend
npx tsx src/server.ts- Backend health:
curl http://localhost:6767/csfaq/api/health - Frontend dev: Open
http://localhost:5173/csfaq/in your browser - Backend serves SPA: Open
http://localhost:6767/csfaq/(uses compiled frontend fromapps/frontend/dist)
pnpm buildThis runs turbo build, which:
- Builds the frontend Vite SPA into
apps/frontend/dist - The backend TypeScript is executed directly via
tsx(no separate build step)
pnpm test:run # Unit tests
pnpm test:e2e # End-to-end tests (Playwright)
pnpm test:all # Both
pnpm typecheck # TypeScript type checking
pnpm lint # ESLintAfter the server is running with a connected database, create an admin user:
curl -X POST http://localhost:6767/csfaq/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"firstName": "Admin",
"lastName": "User",
"email": "admin@example.com",
"password": "your-secure-password",
"phone": "+1234567890"
}'Then promote the user to admin in MongoDB:
// In MongoDB shell or Atlas UI
db.users.updateOne(
{ email: "admin@example.com" },
{ $set: { role: "admin" } }
)| Script | Description |
|---|---|
pnpm dev |
Start all apps in development mode |
pnpm build |
Build all apps for production |
pnpm test |
Run tests in watch mode |
pnpm test:run |
Run tests once |
pnpm typecheck |
TypeScript type checking |
pnpm lint |
Run ESLint |
pnpm format:check |
Check Prettier formatting |
pnpm format:write |
Fix Prettier formatting |