AppTram
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
index.ts
https://Siney--25bc4f8e30fa11f0a393569c3dd06744.web.val.run
A digital ticketing system for tram services that allows users to:
- Create an account
- Purchase tram tickets
- View purchased tickets
- Generate QR codes for ticket validation
- Scan and verify tickets
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema
│ │ └── queries.ts # Database operations
│ ├── routes/
│ │ ├── auth.ts # Authentication routes
│ │ ├── tickets.ts # Ticket management routes
│ │ └── verification.ts # Ticket verification routes
│ └── index.ts # Main API entry point
├── frontend/
│ ├── components/
│ │ ├── Auth.tsx # Login/Register components
│ │ ├── TicketList.tsx # Display purchased tickets
│ │ ├── TicketPurchase.tsx # Purchase new tickets
│ │ ├── TicketScanner.tsx # Scan tickets for verification
│ │ └── TicketView.tsx # Display individual ticket with QR
│ ├── index.html # Main HTML template
│ └── index.tsx # Frontend entry point
└── shared/
└── types.ts # Shared type definitions
- User Authentication: Register and login functionality
- Ticket Purchase: Buy tickets with different validity periods
- Ticket Management: View purchased tickets and their status
- QR Code Generation: Generate unique QR codes for each ticket
- Ticket Verification: Scan QR codes to verify ticket validity
- Admin Functions: Verify tickets and view usage statistics
- Backend: Hono.js API framework with SQLite database
- Frontend: React with Tailwind CSS
- QR Code: QR code generation and scanning libraries
- Authentication: JWT-based authentication