Skip to content

leonardodimarchi/backend-template

Folders and files

NameName
Last commit message
Last commit date
Dec 24, 2023
Jul 3, 2023
Oct 6, 2023
Jan 12, 2024
Dec 23, 2023
Dec 26, 2023
Sep 22, 2023
Oct 6, 2023
Sep 22, 2023
Sep 29, 2023
Sep 29, 2023
Sep 22, 2023
May 15, 2023
Dec 28, 2023
Jun 18, 2023
May 23, 2023
Oct 6, 2023
Dec 26, 2023
Dec 26, 2023
Jun 3, 2023
Dec 5, 2023

Repository files navigation

Backend Template


License Build Unit Tests

A template to build REST APIs.

Code Formatting and Linter

This project uses the following tools:

  • ESLint: a linter to analyze the code statically and identify potential errors or enforce coding conventions.

  • Prettier: code formatter that helps with the code formatting (after writing) in an opinionated and standardized way.

TODOs

This is where i'm going to place my ideas and things that i want to do or use in this project:

  • Editor config
  • Prettier precommit hook
  • Shields at the README (tests and build)
  • Path aliases
  • Clean architecture
  • Value Objects where needed
    • Factories at the entities (interface to receive non VO values)
  • Good and scalable error handling
    • Try to handle common exceptions with a global-scoped exception filter and module errors (errors and business-errors) with controller-scoped exception filters. Both responsible for the i18n
  • i18n (fully handled by the presentation layer)
    • Type safety
    • DTO translations
  • Serverless adapter example
  • Implement refresh token
  • Add user reset password module
  • Add a mail service provider
  • Add templates to create new resources modules
  • Ignore repositories and DTOs when running a test coverage
  • Add some module to interact with user (such as course or quizzes)
  • Auth module with passport
  • Validate request user permissions when calling a method (for example, an admin user cannot enroll at a course)
  • Add base user roles such as Admin, Student and Instructor
  • Environment service
  • Add JWT Secret
  • Translate Auth error messages
  • Translate role guard error messages
  • SWC

About

NestJS template to create REST APIs

Topics

Resources

License

Stars

Watchers

Forks

Languages