This is the Magic3T monorepo, which includes the backend, the frontend and some shared type libraries.
- Framework: NestJS
- WebSockets: Socket.IO with
@nestjs/websockets - Database: Cloud Firestore (with Firebase)
- API Documentation: OpenAPI (
@nestjs/swagger) + Scalar - Validation: class-validator + class-transformer + Zod
- Observability: Sentry
- Testing: Vitest (very little tests so far)
- Framework: React 19 with React Compiler
- Build Tool: Vite
- Routing: TanStack Router
- State Management: TanStack Query + React Hook Form
- WebSockets: Socket.IO
- UI Components: Radix UI + Lucide Icons + React Icons + Tailwind CSS
- Authentication: Firebase Auth + Firebase Functions
- Analytics: Vercel Analytics + Speed Insights
- Observability: Sentry (+ PostHog in the future)
- Package Manager: npm Workspaces
- Linting: Biome JS
- CI/CD: GitHub Actions (Biome CI, Reviewdog, npm audit, Migrations)
- Deployment: Render with IaC (backend) + Vercel (frontend) + Firebase
- Debugging: VSCode Launch Configurations and a bunch of Tasks + Problem Matchers (see
.vscodefolder)
- backend: The backend server built with NestJS.
- frontend: The frontend application built with React and Vite.
- migrations: SQL migrations for PostgreSQL schema management. See MIGRATIONS.md.
First off, install dependencies for all projects:
npm install-
Navigate to the
backenddirectory. -
Provide the necessary environment variables by copying the
.env.examplefile to.envand filling in the required values.
Important environment variables:
- Firebase admin credentials in the
FIREBASE_ADMIN_CREDENTIALSenvironment variable in a base64 encoded JSON format- Sentry DSN in
SENTRY_DSN(optional for development - if not provided, Sentry will be disabled)
- To run the backend server locally, navigate to the
backenddirectory and start the server:
npm run start:dev-
Navigate to the
frontenddirectory. -
Provide the necessary environment variables by copying the
.env.examplefile to.envand filling in the required values.
Important environment variables:
- Firebase configuration (
VITE_FIREBASE_*)- API URL (
VITE_API_URL)- CDN URL (
VITE_CDN_URL)- Sentry configuration (
VITE_SENTRY_DSN,SENTRY_AUTH_TOKEN, etc.) - optional for development
- To run the frontend application locally, use the following command:
npm run devNote: Sentry is only enabled in production builds. During development, no errors or traces will be sent to Sentry.