Skip to content

Evusma/duck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Duck App 🦆

https://theduckfront.osc-fr1.scalingo.io/

A simple full-stack application that displays random quotes. The project is composed of:

  • A FastAPI backend that exposes a REST API
  • A React frontend (built with Vite) that consumes the API and displays quotes

This project was built as part of my personal portfolio to demonstrate clean backend architecture, API design, and frontend–backend integration.

Backend Details

Features

  • Single REST endpoint: /quote
  • Returns a random quote as JSON
  • Type-safe responses using Pydantic
  • CORS enabled for frontend integration
  • Easy to extend with additional endpoints

Running the Backend

cd back
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload

The API will be available at: http://localhost:8000/

Frontend Details

Features

  • Simple React UI
  • Fetches data from the backend API
  • Displays a random quote
  • Designed to stay minimal and focused on API consumption

Runing the front

cd frontend
npm install
npm run dev

The frontend will be available at: http://localhost:5173

Frontend - Backend integration

  • The frontend calls GET /quote
  • CORS is configured in backend/app/main.py
  • The API URL can be adjusted via environment variables or configuration if needed

Configuration

Database

  • Uses quotes.db back/data/quotes.db
  • Database access logic lives in back/app/helpers/quotes.py

CORS

  • Configured in main.py
  • Add additional frontend origins as needed

About

My first frontend with react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors