This document explains the technical flow and "back scene" logic of the ByteSyntax project. Use this to prepare for technical Q&A during your presentation.
- Frontend: Built with React (TypeScript). Uses Vite for fast builds and Tailwind CSS for the premium UI.
- Backend: Built with FastAPI (Python). Uses Uvicorn as the high-performance ASGI server.
- Database: MySQL managed via SQLAlchemy ORM. This allows for structured and reliable data storage.
- Authentication: JWT (JSON Web Tokens) ensures that only authorized administrators can access the dashboard and mark parcels as collected.
- Staff side: Admin logs in and fills out the
RegisterParcelModal. - Data captured: Student Name, Phone Number, Tracking Number, Courier, and Storage Location.
- Process: The frontend sends a
POSTrequest to the backend/api/v1/parcels/endpoint.
- Verification: The backend checks for duplicate tracking numbers.
- Persistence: SQLAlchemy saves the record to the
parcelstable in MySQL. - Status: The parcel is automatically set to
PENDING. - QR Generation: The system generates a unique QR code link for that specific parcel ID.
- Student side: Accesses the public
TrackingPage. - Lookup: Enters Name, Phone, and the last 4 digits of the tracking number (3-Factor Authentication).
- Result: The system returns the status (
PENDINGorCOLLECTED) and the location.
- Uses FastAPI-Mail to connect to a Gmail SMTP server.
- When an admin requests a password reset, the system generates a temporary recovery token and sends it as a clickable link to their registered email.
- QR Display: The student shows their unique parcel QR code (found on the tracking page).
- Scan: Admin opens the
QrScannerPageon their device. - Logic: The scanner extracts the Parcel ID from the QR code and sends a
PATCHrequest to the backend. - Conclusion: The database updates
statustoCOLLECTEDand records the timestamp.
id: Primary Key (Unique identifier)student_name: Name of the recipientphone_number: Normalised contact infotracking_number: Full courier tracking IDstatus: Enum (Pending / Collected)arrived_at: Auto-timestamp on registrationcollected_at: Timestamp on collection
Good luck with the Q&A! π