The Birthday Database app is a flexible tool that helps users keep track of important birthdays, including those of their loved ones. It features real-time age display in Hijri and Georgian calendars.
- Backend API (Nest.js + PostgreSQL)
- Backend API Hosted on Microsoft Azure: https://birthday-database.azurewebsites.net/
- Frontend Web App (Angular)
- Frontend Hosted on Firebase: https://age-tracker-site.web.app/
- UI/UX Design (Figma)
-
Clone the repository
git clone https://github.com/AbdelrahmanBayoumi/birthday-database.git
-
Install the dependencies
npm install
-
Create a
.env
file in the root directory like.env.example
and fill in the required environment variables:DATABASE_URL
: The connection URL for the PostgreSQL database.JWT_ACCESS_SECRET
: The secret key used to sign the JWT tokens.JWT_REFRESH_SECRET
: The secret key used to sign the JWT refresh tokens.JWT_EMAIL_SECRET
: The secret key used to sign the JWT email verification tokens.FROM_EMAIL
: The email address of the sender (e.g.Birthday Database <no-reply@birthday-datbase.com>
).EMAIL_PASS
: The password of the sender's email address.HOST_URL
: The URL of the frontend application.PORT
: The port number for the server.
-
Push the database schema to the database using Prisma CLI
npx prisma db push
-
Start the server
npm run start:dev
- Nest.js: A progressive Node.js framework for building efficient and scalable server-side applications.
- PostgreSQL (or choose your preferred database system): A powerful and reliable open-source relational database management system.
- Prisma: A modern database toolkit that provides an ORM, query builder, and migration tool.
- Passport.js: An authentication middleware for Node.js that supports various authentication strategies.
- JWT: JSON Web Tokens for secure authentication and authorization.
- Jest: A popular JavaScript testing framework for unit testing the backend code.
- Pino: A fast and low-overhead logger for Node.js.
- Swagger: The Swagger UI is an open source project to visually render documentation for an API defined with the OpenAPI (Swagger) Specification
- Refer to the API documentation for detailed information on request/response structures and authentication requirements. ⇒ Postman or Swagger
The backend API provides the following endpoints:
GET /api
- Get the API Swagger documentation.GET /health-check
- Check the health of the API.
POST /auth/signup
- User signup endpoint.POST /auth/login
- User login endpoint.GET /auth/check
- Check user TokenPOST /auth/logout
- User logout endpoint.POST /auth/refresh
: Refresh the authentication token.GET /auth/verification/{token}
: Verify the user's email address by confirming the provided verification token.POST /auth/resend-verification
: Resend the verification email to the user's email address.POST /auth/forgot-password
: Initiate the password reset process by sending a reset link to the user's email.
PATCH /users/:id
- Update user [fullName
orbirthday
]PATCH /users/{id}/change-password
- Change user passwordDELETE /users/:id
- Delete the authenticated user
GET /birthdays
: Retrieve all birthdays for the authenticated user.POST /birthdays
: Create a new birthday for the authenticated user.GET /birthdays/:id
: Retrieve a specific birthday by ID.PATCH /birthdays/:id
: Update a specific birthday by ID.DELETE /birthdays/:id
: Delete a specific birthday by ID.GET /birthday/relationships
: Retrieve all distinct relationships for the authenticated user.
If you want to contribute to this project and make it better with new ideas, your pull request is very welcomed. If you find any issue just put it in the repository issue section, thank you.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.