A fullstack application for simulating and managing sports trades, featuring three frontend displays.
- Backend: FastAPI, Flask, SQLite3
- Frontend: React, Vue.js, Vanilla JS
- View, create, update, and delete teams and players
- Simulate trades between teams
- RESTful API with FastAPI
- Three frontend implementations (React, Vue, Vanilla JS)
- CORS enabled for frontend-backend integration
- Install dependencies:
pip install fastapi uvicorn flask sqlite3
- Run the FastAPI server:
uvicorn main:app --reload
- Install dependencies:
cd frontend npm install - Start the development server:
The app will run on http://localhost:3000 by default.
npm start
- Install dependencies:
cd frontend-vue npm install - Start the development server:
The app will run on http://localhost:8080 by default.
npm run dev
-
Serve the static files using a simple HTTP server.
You can use Python (built-in), Node.js, or VS Code Live Server.Using Python 3:
cd frontend-vanilla python3 -m http.server 5500Then open http://localhost:5500 in your browser.
Or using Node.js http-server:
npm install -g http-server cd frontend-vanilla http-server -p 5500Then open http://localhost:5500 in your browser.
Or with VS Code Live Server:
- Open the
frontend-vanillafolder in VS Code. - Right-click
index.htmland select "Open with Live Server".
- Open the
trade-machine/
├── main.py
├── models.py
├── db/
│ ├── db.py
│ └── nfl_players.sql
├── react.png
├── vue.png
├── vanilla.png
├── README.md
├── frontend/
│ ├── package.json
│ ├── public/
│ └── src/
├── frontend-vue/
│ ├── package.json
│ ├── public/
│ └── src/
├── frontend-vanilla/
│ ├── index.html
│ ├── style.css
│ └── app.js
└── ...
MIT License
Drew [@ajtw7]


