Skip to content
 
 

Repository files navigation

myAdvisor API

Express + Sequelize backend for myAdvisor. Lives in the monorepo next to ../frontend.

Local development uses SQLite; production uses PostgreSQL. Default port 3002.
Bulk draft plans use BullMQ + Redis (REDIS_URL) and a dedicated worker process.

Quick start

npm install
cp .env.example .env   # set staffSecret / studentSecret; REDIS_URL
# Redis (local):
docker run -d --name myadvisor-redis -p 6379:6379 redis:7
npm run db:init        # migrate + seed catalogue, students, demo accounts
npm run start:dev      # API
npm run worker:dev     # separate terminal — BullMQ worker

Or step by step: npm run db:migrate then npm run db:seed. Seed loads committed fixtures/seed (does not rebuild CSVs). To regenerate student/prefix fixtures from source CSVs: npm run db:seed:refresh-fixtures then npm run db:seed.

Demo accounts (after seed):

Role Username Password
Staff 816020000 adminpass
Student DEMO816031565 password123

From monorepo root:

npm run install:all
npm run db:migrate
npm run dev:backend
npm run dev:worker

Stack

Concern Choice
Runtime Node.js 20+ (engines: >=20 <23)
API Express + helmet + rate-limit
Jobs BullMQ + Redis (npm run worker)
ORM Sequelize
DB (dev) SQLite
DB (prod) PostgreSQL (POSTGRES_URL)
Auth bcrypt + JWT (token header)
Logging pino / pino-http
Ingest PDF transcripts, XLSX curriculum

Documentation

Doc Description
docs/API.md Routes & SPA contracts
docs/architecture.md Architecture datasheet
docs/models.md Relational models
docs/cleanup-plan.md Phases 0–7
docs/ops.md Deploy, health, backups
docs/openapi.yaml OpenAPI stub
Root README Monorepo overview

Health

Path Purpose
GET /health/live Liveness
GET /health/ready DB + Redis readiness
GET /health Status page / JSON

Contributors

Part of the Computer Science Programme at the University of the West Indies.

Original: Seth Timothy, Matthew Christian, Nevash Gobin, Akeel Henry

Previous version: Alexis Pitypaul, Shalana Seuraj

2024 Project Course: Quinn Mohammed, Faith Shim, Jarrod Moore

DCIT CCU Program: Joshua Noel, Katoya Ottley, Paul Taylor

Backend updates: @firepenguindisopanda (Nicholas Smith)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages