Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 1.95 KB

README.md

File metadata and controls

79 lines (57 loc) · 1.95 KB

Pet Adoption Server

API Documentation

Postman API Documentation Live Link

Features

  1. Login & Registration

    • Login: Username/email, password
    • Registration: Username, email, password (confirmation)
  2. Pet Details Page (Private)

    • Multiple photos, detailed description, age, breed, gender, health status, location
    • Adoption request button for logged-in users
  3. Pet Adoption Request Page

    • Form: Contact info, additional info, terms agreement
    • Submit button
  4. My Profile

    • User info: Edit profile, change password
    • My Adopted Pets: List with name, photo, adoption date, link to details
  5. Admin Dashboard

    • User Management: View/manage accounts, roles
    • Pet Management: Add/edit/remove pets

Technology Stack

  • Programming Language: TypeScript
  • Web Framework: Express.js
  • ORM: Prisma with PostgreSQL
  • Authentication: JWT (JSON Web Tokens)
  • Validation: Zod

Project Setup Instructions

  1. Clone the repository:

    git clone https://github.com/Sabbir2809/pet-adoption-server
    cd pet-adoption-server
  2. Install dependencies:

    yarn add
  3. Setup environment variables in .env

    NODE_ENV = development;
    PORT = 5000;
    DATABASE_URL = your_postgres_url;
    BCRYPT_SALT_ROUNDS = your_bcrypt_salt_rounds;
    JWT_SECRET = your_jwt_secret;
    JWT_EXPIRES_IN = your_jwt_expires_in;
    REFRESH_JWT_SECRET = your_refresh_jwt_secret;
    REFRESH_JWT_EXPIRES_IN = your_refresh_jwt_expires_in;
    CLOUDINARY_CLOUD_NAME = your_cloudinary_cloud_name;
    CLOUDINARY_API_KEY = your_cloudinary_api_key;
    CLOUDINARY_API_SECRET = your_cloudinary_api_secret;
  4. Run the development server:

    yarn dev
  5. Open http://localhost:5000 in your browser.

Entity Relationship Diagram

ERD