Skip to content

The Birthday Database app is a versatile 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.

License

Notifications You must be signed in to change notification settings

AbdelrahmanBayoumi/birthday-database

Repository files navigation

🗓️ Birthday Database

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.


Open Source Hits license

🚀 How to run

  1. Clone the repository

    git clone https://github.com/AbdelrahmanBayoumi/birthday-database.git
  2. Install the dependencies

    npm install
  3. 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 <[email protected]>).
    • 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.
  4. Push the database schema to the database using Prisma CLI

    npx prisma db push
  5. Start the server

    npm run start:dev

👨🏻‍💻 Technologies Used

  • 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

📦 API Documentation

  • 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:

General

  1. GET /api - Get the API Swagger documentation.
  2. GET /health-check - Check the health of the API.

Auth

  1. POST /auth/signup- User signup endpoint.
  2. POST /auth/login - User login endpoint.
  3. GET /auth/check - Check user Token
  4. POST /auth/logout - User logout endpoint.
  5. POST /auth/refresh: Refresh the authentication token.
  6. GET /auth/verification/{token}: Verify the user's email address by confirming the provided verification token.
  7. POST /auth/resend-verification: Resend the verification email to the user's email address.
  8. POST /auth/forgot-password: Initiate the password reset process by sending a reset link to the user's email.

User

  1. PATCH /users/:id - Update user [ fullName or birthday]
  2. PATCH /users/{id}/change-password - Change user password
  3. DELETE /users/:id - Delete the authenticated user

Birthdays

  1. GET /birthdays: Retrieve all birthdays for the authenticated user.
  2. POST /birthdays: Create a new birthday for the authenticated user.
  3. GET /birthdays/:id: Retrieve a specific birthday by ID.
  4. PATCH /birthdays/:id: Update a specific birthday by ID.
  5. DELETE /birthdays/:id: Delete a specific birthday by ID.
  6. GET /birthday/relationships: Retrieve all distinct relationships for the authenticated user.

🎨 UI/UX Design

See Figma UI Prototype
UI Prototype

💡 Contributing

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.

📝 License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

🌟Star this repository🌟

Please ⭐️ this repo and share it with others



سبحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ، أَشْهَدُ أَنْ لا إِلهَ إِلأَ انْتَ أَسْتَغْفِرُكَ وَأَتْوبُ إِلَيْكَ

About

The Birthday Database app is a versatile 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.

Topics

Resources

License

Stars

Watchers

Forks