Simplex Optimizer is designed with a clean separation between its FastAPI backend and its React frontend, making each piece independently deployable. The backend ships with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/FabianeloV/Metodo-simplex/llms.txt
Use this file to discover all available pages before exploring further.
Procfile that is compatible with any Procfile-aware platform (Heroku, Railway, Render), and the frontend is a standard Vite static build that can be served from GitHub Pages, Netlify, or Vercel. This page walks through configuring and deploying both layers for a production environment.
Backend Deployment
Procfile
Thebackend/Procfile tells the hosting platform how to start the web process:
$PORT variable is injected automatically by platforms such as Heroku, Railway, and Render — you do not need to set it manually.
Push your code to a Git remote
Make sure your latest backend changes are committed and pushed to the branch your hosting platform tracks (typically
main or master).Create a new web service on your platform
Point the platform at the repository and set the root directory to
backend/. Most Procfile-compatible hosts will detect the Procfile automatically and use the web process type.Set backend environment variables
Add the following variables in your platform’s dashboard or CLI:
| Variable | Production value | Description |
|---|---|---|
APP_HOST | 0.0.0.0 | Bind interface (leave as-is) |
APP_PORT | Managed by platform via $PORT | Do not override |
APP_RELOAD | false | Disable auto-reload in production |
CORS_ORIGINS | Your deployed frontend URL(s), comma-separated | Restricts which origins can call the API |
CORS Configuration
Theallow_origins list in backend/app/main.py controls which browser origins are allowed to make cross-origin requests to the API. The current configuration is:
The existing entry
https://fabianelov.github.io covers the GitHub Pages deployment of this project. If you fork the repository and host under a different GitHub username or custom domain, update this value accordingly.Frontend Deployment
The frontend is a Vite-powered React app. A production build produces a fully staticdist/ directory that can be served by any static hosting provider.
Build
Set the production API URL
Create or update
frontend/.env (or set the variable in your CI/CD environment) so VITE_API_URL points to your deployed backend:Build the static site
frontend/dist/. The vite.config.ts sets base: "/Metodo-simplex/", so all asset paths are prefixed with that sub-path — matching the GitHub Pages repository URL structure.Deploy the dist/ directory
Upload or deploy the contents of
frontend/dist/ to your chosen static host:- GitHub Pages — see the automated workflow below.
- Netlify — drag-and-drop
dist/in the Netlify UI, or connect the repository and set the build command tonpm run buildwith publish directoryfrontend/dist. - Vercel — import the repository, set the root directory to
frontend, and Vercel will detect Vite automatically.
Automated GitHub Pages Deployment
The repository includes a GitHub Actions workflow at.github/workflows/frontend.yml that automatically builds and publishes the frontend to GitHub Pages on every push to master that touches the frontend/ directory.
The workflow reads
VITE_API_URL from GitHub Actions Secrets, not from a committed .env file. Before the first deploy, go to Settings → Secrets and variables → Actions in your repository and add a secret named VITE_API_URL with the full production backend URL (e.g., https://your-backend-domain.example.com/api/v1).Production Environment Variables Summary
Backend
| Variable | Recommended production value | Description |
|---|---|---|
APP_HOST | 0.0.0.0 | Bind all interfaces |
APP_RELOAD | false | Disable hot-reload |
CORS_ORIGINS | Comma-separated list of your frontend URLs | Restricts CORS to known origins |
Frontend
| Variable | Source in CI | Description |
|---|---|---|
VITE_API_URL | secrets.VITE_API_URL | Full base URL of the deployed backend API (no trailing slash) |