Skip to content

Repository files navigation

Sidequest

The CS35L project to rule them all.

Chapters

  1. About
  2. Setup
  3. Diagrams
  4. AI Usage
  5. Contact

About

Sidequest is a platform for Bruins to find other Bruins willing to perform small tasks, called "quests", for them in exchange for virtual currency or cash.

Setup

0. Prerequisites

  • Node.JS 24.14.1
  • pnpm ^10

1. Clone .env.example --> .env

Run the following for a BETTER_AUTH_SECRET value.

openssl rand -base64 32

You will also need to set up a Neon database and Resend environment. In lib/sendEmail.ts, the from: 'Sidequest <welcome@sidequest.markets>', line uses a hardcoded domain that is specific to our project. For your Resend environment to work, the domain section (i.e., sidequests.markets) should either be replaced with your domain OR replaced with the Resend fallback domain of resend.dev.

Other maintainers: Ask Rizwaan for the other environment variables necessary to run the app.

2. Install dependencies

pnpm i

3. Push schema to database

pnpm db:push

4. Run dev server

pnpm dev

Open http://localhost:3000 with your browser to see the result.

Testing

Prerequisite

pnpm i
pnpm exec playwright install chromium

Running Tests

Run the route/page assertion tests:

pnpm run test:all

Run one assertion test directly:

pnpm run test:quest-routes

Then run the Playwright e2e tests:

pnpm run test:e2e

The e2e tests use DATABASE_URL, BETTER_AUTH_SECRET, and BETTER_AUTH_URL from .env. They start or reuse the local app at http://localhost:3000, seed two demo users, and clean up their test data after each run.

Diagrams

To help clarify the architecture of our project, the diagrams below detail the two main aspects of our project: the quest completion cycle and the report/user strike flow.

Quest Completion Workflow

State machine diagram of completion workflow

Report & Strike Flow

Sequence diagram of report and strike flow

Diagrams made with the help of PlantUML

AI Usage

The use of Generative AI for agentic coding purposes was constrained to these uses:

  1. Restyling components to use the existing design system through the folowing types of prompts:
Restyle `[X]` `[lines/component]` to use the current design system in the codebase.
  1. Generating a comprehensive test suite to rigorously test our backend API routes against a multitude of edge cases.
Look at @/api/users/me/notifications/[id] and write a unit test verifying the `PATCH` method works as intended.
  1. Generating seed data for demo purposes.
You are writing PostgreSQL seed script for a campus task-marketplace app called Sidequest where students post “qests, bid on them, exchange a currency in the form of credits, complete work, and review each other. The output should be a single .sql file to be run against a database for a class presentation. You can use db schema for reference.

Tables (snake_case): "user", quests, bids, reviews, reports, cases, notifications, skills, courses. The id on quests/bids/reviews/reports/cases is GENERATED ALWAYS AS IDENTITY; users use text IDs; notifications use UUIDs. Quest status: 0=open,1=in-progress,2=completed,3=disputed,4=awaiting-confirmation,5=cancelled. credits_offered: -1=cash, 0=free, >0=credits.

AI models (ChatGPT and Claude) were consulted for minor code requests, such as on how to implement a specific/niche framework feature or explain a cryptic NextJS/React/pnpm bug. All generated code were thoroughly reviewed, and often heavily refactored by us.

Contact

Questions? Contact Rizwaan Bana or Siddhant Patil.