Cooper is a tool for Northeastern students to both submit reviews of their co-ops and filter through reviews of co-ops left by other students.
- Next.js - Web development framework
- Tailwind CSS - CSS framework
- shadcn/ui - Pre-built components
- NextAuth.js - Authentication
- Prisma - ORM
- PostgreSQL - Relational database
- Docker - Containerization
- tRPC - End-to-end typesafe API
- Zod - Validation
This is a T3 Stack project bootstrapped with create-t3-app
.
Before you start you will need the following:
- Clone the repo
git clone [email protected]:sandboxnu/cooper.git
cd cooper
- Install the necessary dependencies. The
postinstall
script also runsprisma generate
.
pnpm install
-
Configure the
.env
file by following the template in.env.example
. See Setting up the environment. -
Run the docker container
docker compose up -d
Note: The
docker-compose.yml
file sets thePOSTGRES_USER
as "admin",POSTGRES_PASSWORD
as "admin", andPOSTGRES_DB
as "cooper" by default.
- Sync the
prisma
schema with the database schema. Do not run this in a production environment.
pnpm prisma db push
- Run the application
pnpm dev
Open http://localhost:3000 with your browser to see the results.
- Create a new file called
.env
or copy the.env.example
and rename it to.env
.
cp .env.example .env
- Complete the file to add your environment variables. These are the defaults for local development. Make sure that the
docker
container is running.
DATABASE_URL="postgresql://admin:admin@localhost:5432/cooper?schema=public"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
To generate GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
, see Setting up OAuth 2.0. To generate a new NEXTAUTH_SECRET
, run the following command in your terminal and add it to the .env
file.
openssl rand -base64 32