Task: Integration of frontend and backend for payment system with functional improvements
🔧 Main areas of work:
Registration and authorization
Verify the correctness of data transmitted from the frontend (email validation, password validation)
Configure password hashing and token generation
Implement saving sessions/tokens in the browser
🖇️ Integration with payment system
Set up endpoint for generating payment links (/api/payments/create)
Implement handling of redirect after successful payment
Add webhooks for payment confirmation
🗃️ Database structure optimization
Conduct an audit of existing tables (Users, Payments, Products)
Implement unique constraints to prevent duplicates
🎁 Product issuance system
📊 User control panel
🔄 Interaction workflow:
User initiates payment through UI
Frontend → Backend: Request to create payment
Backend generates a unique link and records it in the database
User completes payment through the payment gateway
Payment system → Backend: Confirmation of successful transaction
Backend activates the product and updates the status in the database
Frontend receives updated data via WebSocket/polling
🚀 Key control points:
Data integrity check between frontend and backend
Testing edge cases (repeated payments, transaction cancellations)
Load testing critical endpoints
Database schema validation through migrations
Security audit of payment operations
Currently, there are issues with user registration, confusion with database fields (duplicates exist, not all data is saved correctly), and automatic product issuance after payment is not configured. Server logic is somewhat tangled, requiring review and bringing everything to a working state. The main goal is to ensure fast operation and stable product delivery after purchase.
Frontend (src directory):
- React 18
- TypeScript
- Vite (deployment as static only)
- Tailwind CSS
- MUI (Material UI)
- Radix UI (UI components)
- React Router
- Socket.IO Client
- i18next (localization)
- Framer Motion (animations)
Backend (server directory):
- Python (Flask)
- PostgreSQL
- Celery + Redis (asynchronous tasks)
- Gunicorn (server)
- Socket.IO (real-time events)
- JWT (authentication)
- WebRTC (for voice communication via browser)
- WebSocket API (for server and external integrations)
- Integration with OpenAI API (gpt-4o-MINI-realtime-preview)
- DodoPayments (payments)
- Migrations, models, business logic, routes, middleware