Repo for TCBA, a coalition management platform with:
backend/ : Node.js/Express REST API (TypeScript, PostgreSQL) frontend/ : React app (TypeScript, Vite, Tailwind CSS)
backend/controllers/, routes/, services/, middleware/, config/, prisma/: API logic, endpoints, external services, middleware, configs, and database schema definitions frontend/src/pages/: Main React pages/components with admin and user pages
cd backend
npm install
cd frontend
npm installcd backend
npm run devcd frontend
npm run devSet up Prisma:
cd backend
npx prisma db push
npx prisma generate- Docker Desktop must be installed and running (download here)
- Required for local Supabase instance to run PostgreSQL and other services
-
Install Supabase CLI (Homebrew)
brew install supabase/tap/supabase
-
Initialize Supabase in project
cd backend npx supabase init -
Start and Stop local Supabase
npx supabase start npx supabase stop
This creates a local database at
postgresql://postgres:postgres@localhost:54322/postgresCan use Supabase Studio running locally on localhost:54323 to see your DB updates and test -
Configure Environment Variables Create
backend/.envfile:DATABASE_URL="postgresql://postgres:postgres@localhost:54322/postgres" DIRECT_URL="postgresql://postgres:postgres@localhost:54322/postgres"
Will be replaced with production DB URL when ready
For DB Updates:
cd backend npx prisma db push npx prisma generate
Backend uses PostgreSQL/Supabase, Prisma ORM, Clerk Auth, Stripe, AWS SES, and AWS S3. Before each push, run npm run format on both frontend and backend directories for code consistency for all devs. Strapi will be implemented later for total customization on admin side of user content
Documentation Links For Reference: