A simple bulletin board application with a FastAPI backend and a React (Vite + TypeScript) frontend. Users can create, edit, and delete short posts, while the backend keeps everything in memory for quick prototyping.
- Display the current list of bulletin posts.
- Create new posts with a rich Material UI form.
- Edit or delete existing posts inline.
- FastAPI backend with permissive CORS to support local development.
- Frontend: React 19, Vite, TypeScript, Material UI.
- Backend: FastAPI, Uvicorn (ASGI server).
.
├── backend/ # FastAPI service exposing CRUD endpoints
└── frontend/ # React client built with Vite
- Python 3.11+ (project venv was created with 3.13).
- Node.js 18+ (or any version supported by Vite) and npm.
cd backend
python -m venv .venv # optional if you prefer a fresh environment
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install fastapi uvicorn
uvicorn main:app --reload --port 8000The API will be available at http://localhost:8000. Data is stored in memory, so it resets whenever the server restarts.
Open a new terminal:
cd frontend
npm install
npm run devVite will print a local dev URL (typically http://localhost:5173). The app expects the backend at http://localhost:8000.
| Method | Endpoint | Description |
|---|---|---|
| GET | /posts |
Return all posts. |
| POST | /posts |
Add a new post. |
| PUT | /posts/{post_id} |
Update a post by ID. |
| DELETE | /posts/{post_id} |
Remove a post by ID. |
All endpoints accept/return JSON objects with the shape:
{
"id": 123,
"content": "Example post"
}- The frontend currently seeds two posts until it synchronizes with the backend.
- Error handling is minimal and intended for demonstration purposes.
- Consider wiring the backend to a database or persistence layer before production use.
This project is provided as-is for educational purposes.