This project is a restaurant management web application that allows users to browse dishes, place orders, and manage them. It consists of a frontend built with Astro, Svelte, and Tailwind CSS, and a backend built with FastAPI and SQLAlchemy.
cd backend
python -m venv venv
venv\Scripts\activate
source venv/bin/activate
pip install -r requirements.txt
DATABASE_URL
in .env
with your MySQL credentials.alembic upgrade head
python app/populate_db.py
cd frontend
npm install
npm run dev
To start both the backend and frontend simultaneously:
./runBEandFE.bat
app/
: Contains the main application logic.routers/
: API route definitions.models.py
: Database models.schemas.py
: Pydantic schemas for data validation.crud.py
: Database operations.alembic/
: Database migration scripts..env
: Environment variables.src/
: Source code.components/
: Svelte components.utils/
: Utility functions and stores.pages/
: Astro pages.styles/
: Global CSS styles.astro.config.mjs
: Astro configuration.tailwind.config.js
: Tailwind CSS configuration./api/dishes
: Fetch dishes with optional filters./api/orders
: Create a new order./api/orders
: Retrieve all orders./api/orders/{order_id}
: Delete an order by ID.Command | Action |
---|---|
python app/main.py |
Start the backend server. |
alembic upgrade head |
Apply database migrations. |
python app/reset_db.py |
Reset the database. |
Command | Action |
---|---|
npm run dev |
Start the frontend server. |
npm run build |
Build the frontend for production. |
npm run preview |
Preview the production build. |
git checkout -b feature/your-feature-name
git commit -m "Add your message"
git push origin feature/your-feature-name
This project is licensed under the MIT License.