Routes | Building | Interaction
This project was developed as part of the Trinity College Dublin Hackathon. Our software introduces a free ticketing system, relieving college societies of extra charges for ticketing processes for various events. Event organizers can easily keep track of those who express interest in the event and who actually purchase tickets. This is achieved by our custom-made algorithm, which scrapes the .csv formatted bank statement, identifies the payers, and updates the database accordingly. The fact that our solution is designed to be self-instantiating means that event organizers can safely upload their bank statements without worrying about sharing them with third-party platforms.
POST
/register
(register a new user)
None
http code content-type response 201 application/json {"code":"201","error": None,"message": "client registered successfully" 400 application/json {"code":"400","error":"Bad Request","message": "Please provide client details"} 500 application/json {"code":"500","error": "Internal server error","message": "An error occurred"}
POST
/login
(log in using existing credentials)
None
http code content-type response 201 application/json {"code":"201","error": None,"message": "client logged in successfully" 400 application/json {"code":"400","error":"Bad Request","message": "Please provide client details"} 401 application/json {"code":"401","error": "Unauthorized","message": "Invalid email or password"} 500 application/json {"code":"500","error": str(e),"message": "An error occurred"}
POST
/event/{event_id}/register
(register for an existing event)
name type data type description current_user required Object Object containing current user data event_id required int Event ID
http code content-type response 201 application/json {"code":"201","error": None,"message": "Client registered for event successfully" 500 application/json {"code":"500","error": str(e),"message": "Failed to register client for event"}
POST
/create-event
(create a new event)
name type data type description current_user required Object Object containing current user data
http code content-type response 201 application/json {"code":"201","error": None,"message": "Event created successfully" 400 application/json {"code":"400","error":"Bad Request","message": "Please provide event details"} 500 application/json {"code":"500","error": "Internal server error","message": "An error occurred"}
POST
/bank-statement/{event_id}
(upload a bank statement for processing)
name type data type description current_user required Object Object containing current user data event_id required int Event ID
http code content-type response 200 application/json {"code":"200","error": None,"message": "File uploaded successfully" 400 application/json {"code":"400","error":"Bad Request","message": "File expected"} 400 application/json {"code":"400","error":"Bad Request","message": "CSV file expected"} 400 application/json {"code":"400","error":"Bad Request","message": "CSV structure is invalid"}
GET
/event/{event_id}
(retrieve the event page)
name type data type description current_user required Object Object containing current user data event_id required int Event ID
http code content-type response 200 application/json {"code":"200","error": None,"message": "Event retrieved successfully" 400 application/json {"code":"400","error":"Bad Request","message": "Please provide event id"} 404 application/json {"code":"404","error":"Bad Request","message": "Event not found""}
GET
/
(test the functionality of the server)
None
http code content-type response 200 application/json {"code":"200","error": None,"message": "Welcome to the API"
GET
/table
(check the contents of the database tables)
None
http code content-type response 200 application/json {"code":"200","error": None,"message": "Table retrieved successfully"
GET
/session
(check the functionality of the authorization)
None
http code content-type response 200 application/json {"code":"200","error": None,"message": "Session retrieved successfully"
GET
/user
(check the data of the current user)
None
http code content-type response 200 application/json {"code":"200","error": None,"message": "User retrieved successfully"
Requirements:
- Docker
- Clone the repository: git clone
https://github.com/mykbit/Hassle-Free-Ticketing.git
- Navigate to the project directory: cd
path/to/Hassle-Free-Ticketing
- Insert your Revolut QR code (or simply your account details) in
/Hassle-Free-Ticketing/client/src/assets/
- Build the project:
docker compose up --build
- By default the app is hosted locally, so open
http://localhost:8000
- To utilize the functionality of the solution proceed to
http://localhost:8000/register
orhttp://localhost:8000/login
- After successful registration/login, you can either host an event or register for an existing one.
- Upon registering for an event you will be prompted to pay for the tickets via Revolut or any other banking system that provides a simple process such as QR codes.
- If you are an event host, you can upload your bank statement in a
.csv
format tohttp://localhost:8000/bank-statement/{event_id}
to check who expressed their interest and paid for the tickets.