Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Latest commit

 

History

History
97 lines (57 loc) · 3.61 KB

README.md

File metadata and controls

97 lines (57 loc) · 3.61 KB

Internal Architecture

This section provides a detailed overview of the internal architecture and important modules used in the NavigoLearn API. This is primarily meant for developers who wish to understand the inner workings of the API or contribute to its development.

Table of Contents

Scripts

Scripts are used to perform various tasks, such as starting the server or running tests.

Controllers

Controllers are the handlers that respond to various HTTP requests. Each controller has different tasks, such as handling user authorization or dealing with specific database records.

Types

Types are used to define the structure of various data entities (like Users or Events) and their relationships.

Models

Models define the structure of the various data entities (like Users or Events), their relationships, and also the methods to interact with the database.

Responses

Responses classes are used to send data back to the client in a consistent format.

Helpers

Helpers are used to perform various tasks so that the controllers are not bloated with code that might change.

Database Management

Database management helpers are used to perform various tasks related to the database.

Response Management

Response management helpers are used to format the response JSON sent back to the client. This usually uses Responses classes

Routes

Routes decide how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, POST, and so on).

This uses Controllers

Middleware

Middleware functions have access to the request object (req), the response object (res), and the next function in the application’s request-response cycle.

Validators

Validators are middlewares used to check the integrity of incoming data before it's processed by the application.

Utilities

Utility functions and classes provide useful features used across the application.

Remember, understanding the codebase's architecture is crucial for making meaningful contributions or understanding how to resolve issues. You are encouraged to explore each section in detail.

SQL

SQL files are used to create and update the database schema. They are also used to create stored procedures and functions for creating dummy data.