This is a sample Node.js application comprehensive API including features such as user authentication, token refresh, user logout, password reset, and user management (creation, update, deletion).
Additionally, it supports authentication through various platforms including Facebook, Apple, Google, and Github. Twitter and LinkedIn are planned for future integration.
The project also includes a Swagger documentation.
- Auth
- Authenticate user
- Email verify
- Implement "Forgot Password" via email
- Implement "Forgot Password" via phone
- Logout a user
- Refresh token
- Implement "Reset Password" via email
- Implement "Reset Password" via phone
- User
- Create a new user
- Update user
- Reset password
- Delete user
- Social Platform Integration
- Apple
- Github
- Testing
- Unit
- E2E
- Integration
- Implement Swagger for API documentation
The REST API exposes its OpenAPI. You can view the API definition interactively using the Swagger UI, hosted at /docs. Simply start the server and navigate to http://127.0.0.1:5858/docs in your browser to access the Swagger UI.
Alternatively, you can explore the online version of the API documentation without running the server.
Development environment requirements:
- Node.js >= 20
- Docker >= 24
- Docker Compose V2
cp .env.dev .env
docker compose up -d --build npm run migrate:create --name=<NAME>
npm run migrate:run npx husky install
npx husky add .husky/commit-msg 'npm run commit-msg'
npx husky add .husky/pre-commit 'npm run pre-commit'- Because files are not executable by default; they must be set to be executable.
chmod ug+x .husky/*
chmod ug+x .git/hooks/* npm run commit npm run release:patch // Patch release 0.1.0 -> 0.1.1
npm run release:minor // Minor release 0.1.1 -> 0.2.0
npm run release:major // Major release 0.2.0 -> 1.0.0- Don’t use deprecated or vulnerable versions of Express
- Use TLS
- Use Helmet
- Use cookies securely
- Prevent brute-force attacks against authorization
- Ensure your dependencies are secure
- Avoid other known vulnerabilities
- Additional considerations
Happy to get your feedback, but also you are feel free to raise a pull request.
This project is licensed under the MIT. See the LICENSE.md file for details.

