This is a backend application that provides an API for exploring a version control system (VCS) repository.
Supported VCS:
- Github
- Gitlab
- Bitbucket
- Clone the repository
git clone- Install dependencies
bun install- Start the application
bun start- Start the application in development mode
bun dev- Run tests
bun testThe project uses Swagger OAS 3.0 for documentation.
While the application is running, the Swagger UI is available at http://localhost:3000/swagger
The project uses the following folder structure:
├── src
| ├── controllers
| ├── plugins
| ├── routes
| ├── services
| └── types
└── tests
The Service-Route-Controller (SRC) Architecture is an architectural pattern used for structuring backend applications. It provides a clear separation of responsibilities, making it easier to organize and maintain code. The architecture consists of three main components:
- Service: Responsible for handling business logic and interactions with databases or other data sources.
- Route: Defines API routes and endpoints to direct incoming HTTP requests to the appropriate controllers.
- Controller: Manages application logic and handles HTTP requests.
The SRC Architecture draws inspiration from the Model-View-Controller (MVC) pattern, adapting it to the context of backend development. While not a strict implementation of MVC, it embraces the principles of separation of concerns and modularity, facilitating the development of scalable and maintainable backend applications.
Elysia is a backend framework that is built on top of the bun runtime. It provides a set of tools and conventions that make it easier to build backend applications.
Bun is designed as a drop-in replacement for Node.js
The bun runtime is a lightweight runtime that is optimized for building backend applications. It is also the recommended runtime for Elysia.
As stated in the bun documentation, Bun is a new JavaScript runtime built from scratch to serve the modern JavaScript ecosystem.
The bun create command generates a folder structure that is optimized for small projects. The folder structure described in this template is more suitable for medium to large projects.
The SRC Architecture is a proven architectural pattern that is used by many popular backend frameworks, such as NestJS, AdonisJS, and FeathersJS. It is also the recommended architecture for Elysia.