Spaces:
Paused
Paused
| # Quick Start Guide - Modern React SaaS | |
| Complete setup and run instructions for the new Job Apply AI React frontend. | |
| ## π What's New | |
| β¨ **Modern React 18 Frontend** | |
| - Beautiful dark SaaS theme (black + emerald green) | |
| - Smooth Framer Motion animations | |
| - Professional component library | |
| - Responsive design for all devices | |
| π **Improved State Management** | |
| - Zustand for reactive state | |
| - Persistent storage | |
| - Clean API | |
| β‘ **Better Performance** | |
| - Optimized React build | |
| - Code splitting | |
| - CSS-in-JS with Tailwind | |
| π οΈ **REST API Endpoints** | |
| - Proper API structure | |
| - CORS enabled | |
| - Easy to extend | |
| ## π Quick Start (5 minutes) | |
| ### 1οΈβ£ Install Dependencies | |
| ```bash | |
| # Python backend | |
| pip install -r requirements.txt | |
| pip install flask-cors | |
| # React frontend | |
| cd frontend | |
| npm install | |
| ``` | |
| ### 2οΈβ£ Start the Backend (Terminal 1) | |
| ```bash | |
| # Activate virtual environment | |
| source venv/bin/activate # Linux/Mac | |
| # OR | |
| venv\Scripts\activate.bat # Windows | |
| # Run Flask server | |
| python -m job_apply_ai.ui.app_new | |
| ``` | |
| You should see: | |
| ``` | |
| Running on http://0.0.0.0:5050 | |
| ``` | |
| ### 3οΈβ£ Start the Frontend (Terminal 2) | |
| ```bash | |
| cd frontend | |
| npm run dev | |
| ``` | |
| You should see: | |
| ``` | |
| VITE v5.0.0 ready in 123 ms | |
| β Local: http://localhost:3000/ | |
| ``` | |
| ### 4οΈβ£ Open Your Browser | |
| Visit: **http://localhost:3000** | |
| You should see the beautiful Job Apply AI home page! π | |
| ## π How to Use | |
| ### Home Page | |
| - Overview of features | |
| - Call-to-action buttons | |
| - Statistics | |
| ### Workflow | |
| 1. **Upload CV** - Drag and drop your .docx file | |
| 2. **Search Jobs** - Enter job title and location | |
| 3. **Review Jobs** - See matched skills for each job | |
| 4. **Generate CVs** - Select jobs and create tailored CVs | |
| 5. **Download** - Get all CVs as a ZIP file | |
| ### Settings | |
| - Toggle between "Smart Mode" (local) and "AI Mode" (with API) | |
| - Configure LLM provider | |
| - Enable/disable professional summaries | |
| ## π¨ Customization | |
| ### Change Theme Colors | |
| Edit `frontend/tailwind.config.js`: | |
| ```javascript | |
| colors: { | |
| emerald: { | |
| 500: '#22c55e', // Change to your color | |
| // ... other shades | |
| }, | |
| black: '#0A0E27', // Or your dark color | |
| // Custom colors here | |
| } | |
| ``` | |
| ### Modify Animations | |
| Edit `frontend/src/components/common/Button.tsx`: | |
| ```tsx | |
| whileHover={{ y: -2 }} // Change hover distance | |
| whileTap={{ scale: 0.98 }} // Change tap scale | |
| transition={{ duration: 0.3 }} // Change duration | |
| ``` | |
| ### Add New Pages | |
| 1. Create `frontend/src/components/pages/NewPage.tsx` | |
| 2. Import in `frontend/src/App.tsx` | |
| 3. Add route logic in App component | |
| Example: | |
| ```tsx | |
| {currentPage === 'newpage' && ( | |
| <NewPage onBack={() => setCurrentPage('home')} /> | |
| )} | |
| ``` | |
| ## π§ Development Commands | |
| ```bash | |
| # Frontend | |
| cd frontend | |
| npm run dev # Start dev server | |
| npm run build # Build for production | |
| npm run preview # Preview production build | |
| npm run type-check # Check TypeScript | |
| npm run lint # Run ESLint | |
| ``` | |
| ## π Project Structure | |
| ``` | |
| Job-apply-AI/ | |
| βββ frontend/ # React app (NEW) | |
| β βββ src/ | |
| β β βββ components/ | |
| β β β βββ common/ # Reusable components | |
| β β β βββ pages/ # Full pages | |
| β β β βββ sections/ # Page sections | |
| β β βββ store/ # Zustand store | |
| β β βββ types/ # TypeScript types | |
| β β βββ utils/ | |
| β β β βββ api.ts # API calls | |
| β β β βββ helpers.ts # Utilities | |
| β β βββ styles/ # Global CSS | |
| β β βββ App.tsx # Root component | |
| β β βββ main.tsx # Entry point | |
| β βββ tailwind.config.js # Theme config | |
| β βββ vite.config.ts # Build config | |
| β βββ package.json | |
| β | |
| βββ job_apply_ai/ # Python backend | |
| β βββ ui/ | |
| β β βββ app_new.py # New Flask app (UPDATED) | |
| β β βββ app.py # Old Flask app (legacy) | |
| β βββ scraper/ # Job scraping | |
| β βββ cv_modifier/ # CV customization | |
| β βββ utils/ # Helpers | |
| β | |
| βββ requirements.txt # Python deps (UPDATED) | |
| βββ DEPLOYMENT_GUIDE.md # Deployment (NEW) | |
| βββ SAAS_FEATURES.md # Features doc (NEW) | |
| βββ README.md # Main docs (UPDATED) | |
| ``` | |
| ## π Deploying to Production | |
| ### Build the frontend | |
| ```bash | |
| cd frontend | |
| npm run build | |
| ``` | |
| This creates `frontend/dist/` with optimized files that Flask will serve. | |
| ### Run with production settings | |
| ```bash | |
| # Set environment variables | |
| export FLASK_ENV=production | |
| export FLASK_DEBUG=False | |
| export SECRET_KEY=your_random_secret_key | |
| # Run with gunicorn | |
| pip install gunicorn | |
| gunicorn -w 4 -b 0.0.0.0:5050 job_apply_ai.ui.app:app | |
| ``` | |
| Visit `http://localhost:5050` to see the production build. | |
| ## π Troubleshooting | |
| ### Frontend won't load | |
| ```bash | |
| # Make sure backend is running | |
| curl http://localhost:5050 | |
| # Check React dev server | |
| # Should see "Ready in XXX ms" in terminal | |
| ``` | |
| ### API calls failing | |
| ```bash | |
| # Check if endpoints exist | |
| curl http://localhost:5050/api/health | |
| # Should return: {"status":"ok","version":"2.0.0"} | |
| ``` | |
| ### Styles look wrong | |
| ```bash | |
| # Restart dev server | |
| npm run dev | |
| # Clear cache | |
| rm -rf node_modules/.vite | |
| ``` | |
| ### Port already in use | |
| ```bash | |
| # Change port in vite.config.ts or terminal | |
| npm run dev -- --port 3001 | |
| # Or change Flask port | |
| export PORT=5051 | |
| python -m job_apply_ai.ui.app_new | |
| ``` | |
| ## π Key Files to Know | |
| ### Frontend | |
| - **App.tsx** - Main app logic, page routing | |
| - **appStore.ts** - All state management | |
| - **api.ts** - Backend API calls | |
| - **tailwind.config.js** - Colors, themes, animations | |
| - **Job components** - Job search, listing, generation | |
| ### Backend | |
| - **app_new.py** - Flask server with React routing + APIs | |
| - **linkedin.py** - Job scraping | |
| - **cv_analyzer.py** - Skill extraction | |
| - **cv_modifier.py** - CV customization | |
| ## π― Common Tasks | |
| ### Add a new API endpoint | |
| 1. Add backend method in `app_new.py`: | |
| ```python | |
| @app.route('/api/my-endpoint', methods=['POST']) | |
| def my_endpoint(): | |
| return jsonify({'success': True}) | |
| ``` | |
| 2. Add frontend call in `api.ts`: | |
| ```typescript | |
| async myAPICall() { | |
| const response = await api.post('/my-endpoint'); | |
| return response.data; | |
| } | |
| ``` | |
| 3. Use in component: | |
| ```tsx | |
| const handleClick = async () => { | |
| const data = await jobsAPI.myAPICall(); | |
| setNotification({ type: 'success', message: 'Done!' }); | |
| } | |
| ``` | |
| ### Change color scheme | |
| All colors are in `tailwind.config.js` and `globals.css`. Change: | |
| - `emerald` colors for primary actions | |
| - `slate` colors for text/backgrounds | |
| - `black` for dark mode | |
| ### Add a loading skeleton | |
| Import Spinner: | |
| ```tsx | |
| import { Spinner } from '@/components/common'; | |
| <Spinner size="md" /> // sm, md, lg | |
| ``` | |
| ### Create a modal dialog | |
| ```tsx | |
| import Modal from '@/components/common/Modal'; | |
| <Modal isOpen={isOpen} onClose={onClose} title="Confirm"> | |
| Your content here | |
| </Modal> | |
| ``` | |
| ## π Environment Variables | |
| ### Backend (.env) | |
| ``` | |
| FLASK_ENV=development | |
| CV_TAILORING_MODE=local | |
| LLM_PROVIDER=groq | |
| GROQ_API_KEY=xxxxx | |
| ``` | |
| ### Frontend (.env in frontend/) | |
| ``` | |
| VITE_API_URL=http://localhost:5050 | |
| VITE_APP_NAME=Job Apply AI | |
| ``` | |
| ## π Support | |
| Need help? | |
| 1. **Check logs** - Terminal output usually shows the issue | |
| 2. **Read DEPLOYMENT_GUIDE.md** - Detailed deployment info | |
| 3. **Review SAAS_FEATURES.md** - Feature documentation | |
| 4. **Check frontend/README.md** - React-specific docs | |
| ## β Checklist | |
| - [ ] Installed Python and Node.js 18+ | |
| - [ ] Ran `npm install` in frontend folder | |
| - [ ] Pinned flask-cors in requirements.txt | |
| - [ ] Started backend on port 5050 | |
| - [ ] Started frontend on port 3000 | |
| - [ ] Opened http://localhost:3000 | |
| - [ ] Tested file upload | |
| - [ ] Tested job search | |
| - [ ] Tested CV generation | |
| - [ ] βοΈ Celebrated the beautiful new UI! | |
| --- | |
| **Ready to use your amazing new Job Apply AI?** π | |
| Start building better job applications! πΌβ¨ | |