Warning
This project has been deprecated and archived. > It has been completely redesigned and superseded by a new, enterprise-grade Clean Architecture version called Escala.
API for management of students from a university or academy
AcademyCoreAPI is a backend project written in typescript that uses Node.js, Express, Prisma, and SQLite3 (temporarily) to create a RESTful API for a university-like system. The project follows the clean architecture principles and uses TypeScript interfaces, classes, enums, and decorators to implement object-oriented programming concepts.
The project intends to solve the problem of managing the data and operations of a university-like system, such as students, professors, courses, degrees, grades, enrollments, etc. The project aims to provide a secure, scalable, and maintainable API that can handle complex queries and mutations on the data, and that can be easily integrated with different frontend applications or platforms.
The purpose of the project is to demonstrate my skills and knowledge as a backend developer in typescript, and to create a portfolio project that showcases my ability to design and implement a web api using modern technologies and best practices. The project also serves as a learning opportunity for me to explore new concepts and tools in typescript and web development.
I undertook this project because I am passionate about web development and I enjoy working with typescript. I wanted to challenge myself and create a project that is relevant to my field of interest and that can help me improve my coding skills and learn new concepts.
- Creation and management of users
└── 📁src
└── app.ts
└── main.ts
└── 📁modules
└── 📁shared
└── 📁application
└── 📁dto
└── base.dto.ts
└── 📁domain
└── 📁entities
└── base.entity.ts
└── 📁exceptions
└── base.exception.ts
└── entity.validation.exception.ts
└── handleValidationError.ts
└── http.exception.ts
└── http.statusCodes.ts
└── 📁repositories
└── base.repository.ts
└── transaction.ts
└── 📁responses
└── base.response.ts
└── 📁result
└── result.ts
└── 📁usecases
└── base.usecase.ts
└── 📁infrastructure
└── 📁config
└── swagger.ts
└── 📁helpers
└── id.helper.ts
└── password.helper.ts
└── 📁middlewares
└── errorHandler.ts
└── 📁repositories
└── transaction.ts
└── 📁student
└── 📁application
└── create-student.ts
└── 📁domain
└── 📁entity
└── student.entity.ts
└── 📁repository
└── student.repository.ts
└── 📁infrastructure
└── 📁repository
└── 📁__tests__
└── student.repository.test.ts
└── student.repository.ts
└── 📁user
└── 📁application
└── 📁__tests__
└── user.service.test.ts
└── 📁dto
└── 📁__tests__
└── create-user.dto.test.ts
└── dni.dto.test.ts
└── update-user.dto.test.ts
└── create-user.dto.ts
└── dni.dto.ts
└── find-all-by.dto.ts
└── update-user.dto.ts
└── 📁responses
└── create-user.ts
└── find-many-user.ts
└── find-one-user.ts
└── update-user.ts
└── 📁useCases
└── 📁__tests__
└── all.usecase.test.ts
└── create.ts
└── find-all-by-param.ts
└── find-all.ts
└── find-one-by-dni.ts
└── find-one-by-id.ts
└── update-dni.ts
└── update.ts
└── user.service.ts
└── 📁domain
└── 📁entity
└── user.entity.ts
└── 📁exceptions
└── user.exceptions.ts
└── 📁repository
└── user.repository.ts
└── 📁values
└── 📁__tests__
└── canSearchUserBy.test.ts
└── canSearchUserBy.ts
└── user.values.ts
└── 📁infrastructure
└── 📁repository
└── 📁__tests__
└── user.repository.test.ts
└── user.repository.ts
└── 📁tests
└── 📁lib
└── 📁mocks
└── prisma.mock.ts
└── setup.ts
└── 📁utils
└── 📁mocks
└── user.fake.ts
To set up the local environment, follow these instructions in order:
# 1. Clone the repository from GitHub
git clone https://github.com/LZJorge/AcademyCoreAPI.git
# 2. Enter to generated folder
cd AcademyCoreAPI
# 3. Install dependencies
pnpm install
# 4. Compile TypeScript code
pnpm build
- You must create a .env file, from the .env.example file included at the root of the project, which has the necessary environment variables that you need to fill/define to run the project. You should store the .env file at the root of your project, at the same level as package.json.
After all, you can use:
# 6. Start API server
pnpm startYou can run api tests with
# Use this to test api
pnpm testThe API is used through HTTP requests to the available endpoints.
endpoints coming soon
Project is: in progress
- Improvement of documentation
- Add support for other database engines
- This project was inspired by my university management system
Created by @LZJorge - feel free to contact me!