Spaces:
Sleeping
π Complete Documentation Index
Welcome to the Vietnamese Product Rating Prediction System documentation!
π Quick Start (New Users)
If you're just getting started, read these files in order:
QUICKSTART.md β‘
- Installation instructions
- How to run the application
- First-time usage guide
- Start here!
-
- Step-by-step testing procedures
- Expected results for each test
- Troubleshooting common issues
PROJECT_SUMMARY.md π
- Overview of all features
- What has been built
- How to replace dummy ML model
π Detailed Documentation
For Understanding the System
README.md π
- Complete project documentation
- Features, setup, usage
- API endpoints
- Database schema
- CSV file format
ARCHITECTURE.md ποΈ
- System architecture diagrams
- Request flow examples
- Technology stack details
- File responsibilities
- Security features
π― For Different Purposes
I want to... run the application
β Read: QUICKSTART.md
I want to... test all features
β Read: TESTING_GUIDE.md
I want to... understand the code structure
β Read: ARCHITECTURE.md
I want to... replace the dummy ML model
β Read: PROJECT_SUMMARY.md (section: "Replace Dummy ML Model")
I want to... demo to my teacher
β Read: TESTING_GUIDE.md (section: "Demo Checklist for Teacher")
I want to... understand all features
β Read: README.md (section: "Features")
I want to... see API documentation
β Run app, then visit: http://localhost:8000/docs
π Project Files Overview
Documentation Files
βββ README.md # Main documentation
βββ QUICKSTART.md # Quick setup guide
βββ PROJECT_SUMMARY.md # Feature summary
βββ TESTING_GUIDE.md # Testing procedures
βββ ARCHITECTURE.md # System architecture
βββ INDEX.md # This file (navigation)
Code Files
βββ main.py # FastAPI entry point
βββ requirements.txt # Python dependencies
βββ sample_comments.csv # Test data
βββ .gitignore # Git ignore rules
β
βββ app/
βββ config.py # Configuration
βββ database.py # Database setup
βββ models.py # Database models
βββ schemas.py # Pydantic schemas
β
βββ routers/ # API endpoints
β βββ auth.py
β βββ prediction.py
β βββ dashboard.py
β
βββ services/ # Business logic
β βββ auth_service.py
β βββ ml_service.py
β βββ visualization_service.py
β
βββ templates/ # HTML templates
β βββ base.html
β βββ login.html
β βββ register.html
β βββ dashboard.html
β
βββ static/ # Static files
βββ css/
βββ js/
βββ uploads/
π For Students (Project Presentation)
Before Presentation
- Read QUICKSTART.md to set up
- Test everything using TESTING_GUIDE.md
- Review PROJECT_SUMMARY.md for highlights
During Presentation
- Show Swagger UI (bonus points!) β http://localhost:8000/docs
- Demo user journey:
- Register β Login
- Single prediction
- Batch CSV with visualizations
- Explain architecture using ARCHITECTURE.md
Key Points to Mention
β
FastAPI with automatic API documentation
β
JWT authentication for security
β
RESTful API design
β
Data visualization (Chart.js + WordCloud)
β
Separation of concerns (clean architecture)
β
Database relationships and ORM
π§ For Developers
Understanding the Codebase
- ARCHITECTURE.md - System overview
- README.md - Detailed documentation
- Code files (with inline comments)
Modifying the System
To replace ML model:
β Edit: app/services/ml_service.py
β See: PROJECT_SUMMARY.md section "Replace Dummy ML Model"
To add products:
β Edit: app/config.py β PRODUCTS list
To add Vietnamese stopwords:
β Edit: app/services/visualization_service.py β self.stopwords
To change styling:
β Edit: app/templates/*.html (TailwindCSS classes)
To add API endpoints:
β Create route in: app/routers/*.py
π Key Features Reference
| Feature | File | Documentation |
|---|---|---|
| User Authentication | app/routers/auth.py |
README.md |
| Single Prediction | app/routers/prediction.py |
README.md |
| Batch Prediction | app/routers/prediction.py |
README.md |
| WordCloud | app/services/visualization_service.py |
ARCHITECTURE.md |
| Database Models | app/models.py |
README.md |
| ML Service | app/services/ml_service.py |
PROJECT_SUMMARY.md |
π Troubleshooting
For common issues and solutions: β TESTING_GUIDE.md (Troubleshooting section)
For API errors: β Check Swagger UI: http://localhost:8000/docs
For understanding error messages: β ARCHITECTURE.md (Request Flow section)
π Quick Reference Commands
# Install dependencies
pip install -r requirements.txt
# Run application
python main.py
# Access Swagger UI
# Open: http://localhost:8000/docs
# Access dashboard
# Open: http://localhost:8000/dashboard
# Test with sample data
# Upload: sample_comments.csv
β Checklist for Teacher Demo
Before presenting to teacher:
- All dependencies installed (
pip install -r requirements.txt) - Application runs successfully (
python main.py) - Can access Swagger UI (http://localhost:8000/docs)
- Can register and login
- Single prediction works
- Batch CSV prediction works
- Charts and word cloud display correctly
- CSV download works
- Understand system architecture
- Can explain how to replace ML model
π― Learning Outcomes
After completing this project, you will understand:
FastAPI Framework
- Route definition
- Dependency injection
- Automatic API documentation
- Request/response validation
Authentication
- JWT tokens
- Password hashing (bcrypt)
- Protected routes
Database
- SQLAlchemy ORM
- Model relationships
- CRUD operations
Frontend
- Jinja2 templating
- TailwindCSS styling
- JavaScript Fetch API
- Chart.js visualization
Software Architecture
- Separation of concerns
- Service layer pattern
- RESTful API design
π§ Documentation Feedback
If any documentation is unclear or missing information:
- Check other documentation files
- Look at code comments
- Consult with your instructor
π You're All Set!
You now have:
β
Complete working application
β
Comprehensive documentation
β
Testing guide
β
Architecture documentation
β
Demo preparation materials
Good luck with your project! π
Last Updated: November 25, 2024
Project: Vietnamese Product Rating Prediction System
Framework: FastAPI + Jinja2 + TailwindCSS