Skip to content

ChangePlusPlusVandy/tcba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tennessee Coalition for Better Aging (TCBA)

Project Overview

Repo for TCBA, a coalition management platform with:

backend/ : Node.js/Express REST API (TypeScript, PostgreSQL) frontend/ : React app (TypeScript, Vite, Tailwind CSS)

Code Structure

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

Local Setup

Install dependencies

cd backend
npm install
cd frontend
npm install

Start backend

cd backend
npm run dev

Start frontend

cd frontend
npm run dev

PostgreSQL Database Setup

Set up Prisma:

cd backend
npx prisma db push
npx prisma generate

Supabase Setup

  • Docker Desktop must be installed and running (download here)
    • Required for local Supabase instance to run PostgreSQL and other services
  1. Install Supabase CLI (Homebrew)

    brew install supabase/tap/supabase
  2. Initialize Supabase in project

    cd backend
    npx supabase init
  3. Start and Stop local Supabase

    npx supabase start
    npx supabase stop

    This creates a local database at postgresql://postgres:postgres@localhost:54322/postgres Can use Supabase Studio running locally on localhost:54323 to see your DB updates and test

  4. Configure Environment Variables Create backend/.env file:

    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

Notes

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:

About

🕺

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10

Languages