Skip to main content

Getting Started

Plan-A-Party's backend is a Node.js/TypeScript service built on the Restana web framework, MySQL via Knex.js/Objection.js, TSyringe for dependency injection, Redis for caching, and RabbitMQ/Google Pub/Sub for async work.

Run it locally​

yarn install
yarn db:setup # migrations + seeds
yarn start:dev # nodemon, rebuilds and restarts on change

Common commands​

CommandDescription
yarn start:devDev server with nodemon
yarn buildCompile TypeScript to dist/
yarn testRun Jest tests with coverage
yarn lint / yarn lint:fixFormat + lint
yarn db:migrateRun pending migrations
yarn db:migrate:make <name>Create a new migration
yarn db:seedRun seeds

Where things live​

  • src/modules/<name>/ — one directory per feature area: routes, controller, service, DTOs.
  • src/shared/ — cross-cutting middleware, validation helpers, utilities, enums.
  • src/models/ — Objection.js models.
  • src/repositories/ — data access layer, sits between services and models.
  • src/database/migrations/ — Knex migrations.

Where to go next​