Skip to content

Rob-in-son/containerized-fullstack-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Full-Stack FastAPI and React APP

Welcome to the Full-Stack FastAPI and React template repository. This repository serves as a demo application for interns, showcasing how to set up and run a full-stack application with a FastAPI backend and a ReactJS frontend using ChakraUI.

Project Structure

The repository is organized into two main directories:

  • frontend: Contains the ReactJS application.
  • backend: Contains the FastAPI application and PostgreSQL database integration. Each directory has its own README file with detailed instructions specific to that part of the application.

Getting Started

To get started with this template, please follow the instructions in the respective directories:

Prerequisites

  • Docker and Docker Compose installed on your machine
  • Node.js (version 14.x or higher) and npm (version 6.x or higher) for local frontend setup
  • Python 3.8 or higher and Poetry for local backend setup
  • PostgreSQL for database setup

Local Setup

Backend

  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies using Poetry:
    poetry install
  3. Set up the database with the necessary tables:
    poetry run bash ./prestart.sh
  4. Run the backend server with a specific IP address:
    poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
  5. Update configuration: Ensure you update the necessary configurations in the .env file, particularly the database configuration.

Frontend

  1. Navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Run the development server with a specific IP address:
    npm run dev -- --host 0.0.0.0 --port 3000
  4. Configure API URL: Ensure the API URL is correctly set in the .env file.

Docker Setup

Docker Compose

  1. Build and start the services:
    docker-compose up --build
  2. Stop the services:
    docker-compose down

Notes

  • Ensure the .env files in both frontend and backend directories are correctly configured.
  • The docker-compose.yml file defines the services for the frontend, backend, PostgreSQL, proxy manager, Adminer, and Nginx.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 52.8%
  • Python 37.4%
  • HTML 8.2%
  • Dockerfile 0.7%
  • JavaScript 0.5%
  • Mako 0.3%
  • Shell 0.1%