Harden auth and clean project setup

This commit is contained in:
Cauê Faleiros
2026-05-28 14:51:00 -03:00
parent be8f056434
commit 2c102eb2dd
9 changed files with 284 additions and 80 deletions

View File

@@ -1,20 +1,42 @@
<div align="center">
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
</div>
# Fasto
# Run and deploy your AI Studio app
Fasto is a multi-tenant commercial team management system for tracking sales attendance, seller performance, funnels, lead origins, and external n8n/AI integrations.
This contains everything you need to run your app locally.
## Stack
View your app in AI Studio: https://ai.studio/apps/3aacfdea-56fa-4154-a6b9-09ebdedfa306
- Frontend: React, TypeScript, Vite, TailwindCSS, Recharts, Lucide React
- Backend: Node.js, Express, MySQL2, Nodemailer
- Database: MySQL 8
- Local runtime: Docker Compose
## Run Locally
## Local Setup
**Prerequisites:** Node.js
Copy the environment template and adjust values:
```bash
cp .env.example .env
```
1. Install dependencies:
`npm install`
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
3. Run the app:
`npm run dev`
Start the app and database:
```bash
docker-compose -f docker-compose.local.yml up -d --build
```
The app runs at `http://localhost:3001`.
For frontend-only development:
```bash
npm install
npm run dev
```
The Vite dev server runs at `http://localhost:3000` and calls the backend at `http://localhost:3001/api`.
## Notes
- `JWT_SECRET` is required in production.
- Set `CORS_ORIGIN` in production if the frontend is served from a different origin.
- Backend startup currently applies non-destructive schema updates for existing deployments.
- See `CONTEXT.md` for the fuller architecture and project history.