Skip to content

Commit bf8232a

Browse files
committed
first commit
0 parents  commit bf8232a

File tree

183 files changed

+10403
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+10403
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Deploy FastAPI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Fly CLI
17+
uses: superfly/flyctl-actions/setup-flyctl@master
18+
19+
- name: Deploy from fastapi-postgres directory
20+
working-directory: fastapi-postgres
21+
run: flyctl deploy --remote-only
22+
env:
23+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea/
2+
.vscode/
3+
.DS_Store
4+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Gilad
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the “Software”), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Full Stack Template
2+
3+
This is a full stack web application template built with:
4+
5+
- **FastAPI** (Python) backend
6+
- **Vue 3** and **React** frontends — both written in **TypeScript**, with similar structure and design but implemented as **standalone apps**
7+
- **PostgreSQL** database
8+
- **Docker Compose** for full environment orchestration
9+
10+
---
11+
12+
## 🌐 Live View
13+
14+
- [React Frontend ](https://fullstack-template-react.vercel.app/)
15+
- [Vue Frontend ](https://fullstack-template-vue.vercel.app/)
16+
- [FastAPI Backend Docs ](https://full-stack-api.fly.dev/docs)
17+
---
18+
19+
## Features
20+
21+
This template is designed to manage a complete **teacher-student-assignment workflow**:
22+
23+
- **Teacher login** and dashboard
24+
- **Students list** per teacher, with:
25+
- Add / Edit / Delete controls
26+
- Access to student profile
27+
- **Student profile page** including:
28+
- Full CRUD for **assignments**
29+
30+
## Run the Project
31+
```bash
32+
cd docker
33+
docker-compose up --build
34+
```
35+
36+
### Service URLs
37+
38+
- **React frontend**[http://localhost:3040](http://localhost:3040)
39+
- **Vue frontend**[http://localhost:3030](http://localhost:3030)
40+
- **Backend API** (FastAPI) → [http://localhost:5001](http://localhost:5001)
41+
- **PostgreSQL**`localhost:5434`
42+
43+
44+
---
45+
46+
## 🤝 Contributing
47+
48+
Contributions are welcome!
49+
If you find this project useful, consider giving it a ⭐ on GitHub — it helps others discover it!
50+
51+
To contribute, fork the repository and submit a pull request with your enhancements or bug fixes.
52+
53+
---
54+
55+
## 📄 License
56+
57+
This project is licensed under the [MIT License](./LICENSE).

docker/Dockerfile_Fastapi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM python:3.11.13-slim
2+
3+
RUN apt-get update && \
4+
apt-get install -y build-essential git && \
5+
apt-get clean && \
6+
rm -rf /var/lib/apt/lists/*
7+
8+
COPY requirements.txt ./
9+
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
10+
11+
COPY . .

docker/Dockerfile_React

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:18-slim
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm install --legacy-peer-deps
7+
8+
ENV NODE_OPTIONS=--openssl-legacy-provider
9+
10+
COPY . .
11+
12+
RUN npm run build
13+
RUN npm install -g serve
14+
15+
EXPOSE 80
16+
17+
CMD ["serve", "-s", "build", "-l", "80"]

docker/Dockerfile_Vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:16-slim
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
7+
RUN npm install --legacy-peer-deps
8+
9+
COPY . .
10+
11+
RUN npm run build
12+
13+
EXPOSE 80
14+
15+
RUN npm install -g serve
16+
17+
CMD ["serve", "-s", "dist", "-l", "80"]

docker/docker-compose.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: "3.7"
2+
3+
services:
4+
db:
5+
image: postgres:latest
6+
container_name: postgresql1
7+
restart: always
8+
environment:
9+
POSTGRES_USER: admin
10+
POSTGRES_PASSWORD: admin
11+
POSTGRES_DB: postgres
12+
POSTGRES_INITDB_ARGS: "--auth=md5"
13+
ports:
14+
- "5434:5432"
15+
volumes:
16+
- postgres_data:/var/lib/postgresql/data
17+
18+
backend:
19+
container_name: fastapi-backend
20+
build:
21+
context: ../fastapi-postgres
22+
dockerfile: ../docker/Dockerfile_Fastapi
23+
restart: always
24+
command: bash start_server.sh
25+
depends_on:
26+
- db
27+
environment:
28+
DATABASE_URL: "postgresql+asyncpg://admin:admin@db:5434/postgres"
29+
ports:
30+
- "5001:80"
31+
32+
33+
vue-frontend:
34+
container_name: vue3-frontend
35+
build:
36+
context: ../vue3
37+
dockerfile: ../docker/Dockerfile_Vue
38+
restart: always
39+
ports:
40+
- "3030:80"
41+
environment:
42+
- VITE_API_URL=http://host.docker.internal:5001
43+
44+
react-frontend:
45+
container_name: react-frontend
46+
build:
47+
context: ../react
48+
dockerfile: ../docker/Dockerfile_React
49+
restart: always
50+
ports:
51+
- "3040:80"
52+
environment:
53+
- REACT_APP_API_URL=http://host.docker.internal:5001
54+
55+
volumes:
56+
postgres_data:

fastapi-postgres/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.idea
2+
venv
3+
.venv
4+
__pycache__
5+
.env

fastapi-postgres/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM python:3.11.13-slim
2+
3+
RUN apt-get update && \
4+
apt-get install -y build-essential git && \
5+
apt-get clean && \
6+
rm -rf /var/lib/apt/lists/*
7+
8+
COPY requirements.txt ./
9+
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
10+
11+
COPY . .

0 commit comments

Comments
 (0)