API Yumelio is an API for creating a portfolio.
- Technologies used for it are :
NodeJS Express Framework
TypeScript
Json Web Token & Session
Bcrypt for passwords
Dotenv to configure environment variables
Ajv to create schema
Helmet for API security
- For database :
PostgreSQL (DBSM)
pgAdmin4 (GUI)
- For versioning :
Git & GitHub/ GitLab
Sqitch for database versioning
- For testing :
Jest
Supertest
- For documentation :
Swagger UI with swagger-express
First, clone the repository
git clone <ssh link>
Then, install the packages needed for the application
npm install
# or npm i
Add .env
file and configure your database :
#INFO CONNEXION DB FOR PSQL new Client()
PGHOST=localhost
PGDATABASE=#
PGUSER=#
PGPASSWORD=#
PGPORT=5432
And add all the environment variables needed for the application :
#SESSION
SESSION_SECRET=#
#JWT
#Generate random token :
#launch node and copy
#require("crypto").randomBytes(64).toString("hex")
ACCESS_TOKEN_SECRET=#
REFRESH_TOKEN_SECRET=#
# DEBUG
DEBUG=EntryPoint,Pool,ErrorHandling,Controller,Jwt,Schema
#MAILER
USER_MAILER=
PASSWORD_MAILER=
And then, you can run the application with the following command
npm run dev
And if you want to see the documentation, launch the app and add at the end of url /api-docs
http://localhost:<PORT>/api-docs
- Start
- Folder Structure
- Project
- Use case
- CDM - LDM - PDM
- Endpoints
- Entrypoint
- Structure : how it works
- Database
- Typescript
- Authentication : JsonWebToken
- Check the body with AJV
- Nodemailer
- Handle and log the errors
Data Models :
Security :
Express & Typescript :
Nodemailer :
PostgreSQL :
Convert SVG :