Skip to content

Laernos/Husky-Adoption

Repository files navigation

Husky Adoption

Python Flask JWT React Node SQLite Docker

Husky Adoption is a demo website where people can discover, meet, and adopt pets online. You can create an account, browse through profiles, send adoption requests, donate to support the cause, and manage everything in your dashboard.

Features

  • Browse adoptable pets with detailed profiles, search filters, and application flows.
  • Application scheduling and management endpoints built with Flask blueprints.
  • Donation flow with recurring options, recent donations feed, and thank-you page.
  • User account management including registration, login, profile changes, and dashboard views.
  • Auto-generated API documentation powered by Flasgger.

Demo

Explore - (click to expand)
Main Feature Main Feature
Pet Profiles
Main Feature Main Feature
Donation
Main Feature Main Feature
User Dashboard
Main Feature Main Feature
User Authentication
Main Feature Main Feature

Getting Started

Installation Steps: (click to expand)

Prerequisites

  • Python 3.10 or newer
  • Node.js 18 or newer (npm included)
  • Docker Desktop (optional, for containerised runs)

1. Backend (Flask API)

python -m pip install -r requirements.txt
python -m backend.main

The API listens on http://http://127.0.0.1:5000/.

2. Seed Demo Data

With the virtual environment active and the API stopped:

python backend/initialize_data.py

This resets the SQLite database in backend/instance/database.db and loads sample users, pets, donations, and adoption records.

3. Frontend (React UI)

cd frontend
npm install
npm start

The development server runs on http://localhost:3000 and proxies API requests to http://127.0.0.1:5000

Docker Workflow

The repository includes production-oriented Dockerfiles and a Compose definition that ties both services together:

docker compose up --build
  • husky-backend serves the Flask API on port 5000 and persists the SQLite file via a bind mount to backend/instance.
  • husky-frontend builds the React app, serves it through Nginx on port 3000, and proxies /api/ requests to the backend container.

To refresh demo content inside the running containers:

docker compose run --rm api python initialize_data.py

Testing

Backend tests are implemented with Pytest:

pytest tests

About

A demo pet adoption site where you can meet and adopt adorable pets.

Resources

Stars

Watchers

Forks

Contributors