Skip to content

CSC105-2024/G11-MaAdoptKan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐶 Ma Adodpt Kan

Ma Adopt Kan, the adoption pets website, is designed to help people adopt pets easily. The website will allow users to post pets for adoption and request to adopt a pet. The website is easy to use and helps connect caregivers with people looking to adopt pets in need of a home. The website will have many features, such as post management, adopting confirmation system, and login. All of these will help users to adopt easily without using other platforms that are hard to use.


Getting Started

  1. Clone the repository:
    git clone https://github.com/CSC105-2024/G11-MaAdoptKan.git
    cd G11-MaAdoptKan

💻 Frontend - React

👾 Tech Stack

  • React.ts
  • Vite
  • Axios
  • React Router DOM
  • Tailwind CSS
  • Zod
  • React Icon

💡 Getting Started - React Client

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. The client will be running on http://localhost:5173.


📂 Backend - Node.js

👾 Tech Stack

  • Node.js
  • Hono
  • JWT

🔌 API Endpoints

  • User
Method Endpoint Description
POST /user/create Create new user.
POST /user/login Login user
GET /user/get?id={id} Get user by using user ID.
GET /user/getAll Get all users
GET /user/pets Get all pets from user
  • Request
Method Endpoint Description
POST /request/create Create new request.
GET /request/get?id={id} Get request by using request ID.
GET /request/getAll Get all requests.
GET /request/pet/:petId Get all requests from pet.
DELETE /request/delete/:id Delete request.
  • Pet
Method Endpoint Description
POST /pet/create Create new pet.
PATCH /pet/edit Edit a pet
GET /pet/get?petId={petId} Get pet by using pet ID.
GET `/pet/getAll?count={count} Get all pets by counting to display.
DELETE /pet/delete?petId={petId} Delete pet by using pet ID.

💡 Getting Started - Node.js Server

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies & Genrate the database:

    npm install
    npx prisma generate
  3. Create a .env file and configure the following variables:

    DATABASE_URL="file:./dev.db"
    
    JWT_SECRET_TOKEN=66cb176ce3489eb8020d44d492825a259589203dfc4b480556d97f51a742d2a1
    
  4. Start the development server:

    npm run dev
  5. The server will be running on http://localhost:3000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •