This project is a Gemini Based application combining a React frontend (using Vite) and a FastAPI backend. The frontend is built with TypeScript and React, while the backend serves as an API using FastAPI.
- Frontend: React, Vite, TypeScript, Tailwind CSS
- Backend: FastAPI, Python, Uvicorn
- Linting: ESLint (with TypeScript, React plugins)
- Middleware: CORS (FastAPI)
- Node.js (>= 14.x) and npm or yarn
- Python (>= 3.8)
- pip for managing Python packages
- Virtual Environment for isolating dependencies (recommended)
- Clone the repository and navigate to the backend directory:
git clone https://github.com/your-repo.git cd your-repo/backend python -m venv venv pip install -r requirements.txt
source venv/bin/activate # For Linux/MacOS
- Navigate to the frontend directory:
cd ../frontend npm install npm install @vitejs/plugin-react eslint eslint-plugin-react --save-dev
** //eslint.config.js
import react from 'eslint-plugin-react';
import tseslint from '@typescript-eslint/eslint-plugin';
export default tseslint.config({
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
settings: { react: { version: '18.3' } },
plugins: { react },
rules: {
// Enable React recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
});
**