Skip to main content

Project structure

The project is organised as follows:

  • readme.md
  • config/ <-- configuration files per environment
  • src/
    • index.ts <-- Application launch and teardown
    • server.ts <-- API server setup and initialisation logic
    • db.ts <-- Db initialisation
    • logger.ts <-- Logger setup
    • app.ts <-- The main application router
    • base/
  • website/ <-- Documentation website
    • docs/
    • src/
    • static/
  • .github/workflows/ <-- CI/CD github actions

Project setup

  • nvm setup for node version
  • Typescript setup
    • Linter
    • Import synax
    • Build scripts
    • Production setup
  • Nodemon
    • Reload on config and code changes
    • Ignores tests
    • Dev Tool inspect
  • Tests
    • Jest for typescript
    • Detect open handles
    • Code coverage
    • Supertest
  • Config
    • Env variables support
    • Defaults, dev, test & prod environment settings
  • Logger
    • Json output
    • Api request log
  • Docker file
    • Incremental changes
    • Test image
    • Production image excluding dev dependencies
    • Private packages
  • CI/CD - GitHub Actions
    • Linter
    • Tests
    • Licences audit
    • Sonarqube
    • Integration env
    • Public doc to github pages
    • OpenAPI doc
    • Build image
    • Publish image to Github packages
  • Helm chart
  • Server setup
    • ok and not found middlewares
    • error handler for uncatched and silent exceptions
    • exit on initialization error
    • health probe
    • prometheus metrics
    • license, licenses and license summary endpoints
    • API doc
      - [x] OpenAPI doc
      - [x] Development server url from config
      -[x] Persistency
    • Mongodb setup