FastAPI-React-MongoDB-Template
Deploy and Host FastAPI-React-MongoDB-Template with Railway
FARM-template
lNamelessl/FARM-template
Just deployed
π FARM Stack Template
A modern, scalable template to kickstart your full-stack web projects. This template combines FastAPI (Python), React (JavaScript), and MongoDB, all containerized with Docker and orchestrated via Docker Compose. Itβs designed for rapid development and easy deployment, with a clear structure for both backend and frontend.
Inspired by best practices and scalable architecture patterns, this template helps you build robust web applications with ease.
π Table of Contents
β¨ Features
- FastAPI Backend: High-performance Python API with async support.
- React Frontend: Modern SPA with React.
- MongoDB Integration: Ready for NoSQL data storage.
- Nginx Reverse Proxy: Production-ready HTTP proxy.
- Dockerized: Easy local development and deployment.
- Scalable Structure: Clean separation of concerns for maintainability.
π Project Structure
farm-stack/
βββ backend/ # FastAPI backend (Python)
β βββ Dockerfile
β βββ pyproject.toml
β βββ requirements.txt
β βββ src/
β βββ dal.py
β βββ server.py
βββ frontend/ # React frontend (JavaScript)
β βββ package.json
β βββ public/
β βββ src/
β βββ App.js
β βββ ListTodoLists.js
β βββ ...
βββ nginx/ # Nginx reverse proxy configuration
β βββ nginx.conf
βββ compose.yaml # Docker Compose configuration
π‘ Getting Started
Prerequisites
Quick Start
-
Clone the repository:
git clone cd farm-stack
-
Start all services:
docker compose up --build
-
Access the app:
- Frontend: http://localhost
- Backend API: http://localhost/api (proxied by Nginx)
βοΈ Development
- Backend: Edit files in
farm-stack/backend/src/
. Run locally with FastAPIβs dev server. - Frontend: Edit files in
farm-stack/frontend/src/
. Run locally withnpm start
from thefrontend
directory. - Nginx: Adjust settings in
farm-stack/nginx/nginx.conf
. - Docker Compose: Add or update services in
farm-stack/compose.yaml
.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Deploy
YOU CAN DIRECTLY DEPLOY YOUR OWN VERSION USING THE LINK BELOW
π€ Contribute
Contributions are welcome! If you have ideas for improvements, new features, or bug fixes:
- Fork the repository and create a new branch.
- Submit a Pull Request with your changes.
- Engage in discussions on ideas, enhancements, or fixes.
π¬ Contact
Feel free to reach out if you have questions or suggestions.
- Name: Abdulrahim Kasim
- Email: [email protected]
- GitHub: github.com/lNameless
Deploy and Host FastAPI-React-MongoDB-Template on Railway
FastAPI-React-MongoDB-Template is a modern, production-ready starter kit for building full-stack web applications. It combines FastAPI for the backend, React for the frontend, and MongoDB for data storage, all orchestrated with Docker and Docker Compose. This template is designed for rapid development, scalability, and easy deployment to cloud platforms like Railway.
About Hosting FastAPI-React-MongoDB-Template
Hosting FastAPI-React-MongoDB-Template involves deploying a containerized full-stack application that integrates a high-performance FastAPI backend, a dynamic React frontend, and a robust MongoDB database. With Docker Compose, all services are managed together, simplifying both local development and cloud deployment. Railway provides a seamless platform to deploy, scale, and manage your application and its dependencies, reducing operational overhead and accelerating your go-to-production timeline.
Why Deploy FastAPI-React-MongoDB-Template on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying FastAPI-React-MongoDB-Template on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Common Use Cases
- Rapid prototyping of SaaS products
- Building scalable APIs with modern UIs
- Educational projects and hackathons
Dependencies for FastAPI-React-MongoDB-Template Hosting
- Docker & Docker Compose
- Railway account
Deployment Dependencies
Happy coding! π
Template Content
FARM-template
lNamelessl/FARM-template