Skip to content

Techfest-Sliet/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend for techFEST SLIET

This repository contains the backend for SLIET's techFEST 2024 and further up.

Pre-requisites

  • rust with cargo

To run,

cargo run

To build a release server,

cargo build --release

Comprehensive Routes and Data Structures Explanation

This document provides a detailed overview of the routes defined in the routes.rs file, along with the associated data structures from all provided files.

This was generated by claude, i couldn't be bothered with writing docs

Authentication Routes

  • /auth/sign_in (POST)
    • Data: SignInForm (email: String, password: String)
  • /auth/student/sign_up (POST)
    • Data: StudentSignUp (name, dob, email, phone, role, password, college, reg_no, dept)
  • /auth/faculty/sign_up (POST)
    • Data: FacultySignUp (name, dob, email, phone, role, password, title, dept)
  • /auth/verify (GET)
    • Query: VerificationQuery (id: i32, token: u64)

Profile Routes

  • /profile (GET)
    • Response: Profile (id, dob, name, email, phone, role, verified)
  • /profile (PATCH)
    • Data: ChangeProfile (dob, name, email, phone - all optional)
  • /profile/photo (GET)
    • Query: GetProfilePhoto (id: i32)
  • /profile/photo (POST)
    • Data: Not specified in the given structs
  • /profile/requests (GET)
    • Response: Not specified in the given structs

Domain Routes

  • /domain (GET)
    • Response: Not specified in the given structs
  • /domain (POST)
    • Data: CreateDomain (name: String, description: String)
  • /domain (DELETE)
    • Data: DeleteDomain (id: i32)
  • /domain (PATCH)
    • Data: ChangeDomain (id: i32, name: Option, description: Option)
  • /domain/coordinator/faculty (GET)
    • Query: GetDomainFacultyCoordinator (id: i32)
  • /domain/coordinator/faculty (POST)
    • Data: AddDomainFacultyCoordinator (faculty_id: i32, domain_id: i32)
  • /domain/coordinator/student (GET)
    • Query: GetDomainStudentCoordinator (id: i32)
  • /domain/coordinator/student (POST)
    • Data: AddDomainStudentCoordinator (student_id: i32, domain_id: i32)
  • /domain/photo (GET)
    • Query: GetDomainPhoto (id: i32)
  • /domain/photo (POST)
    • Data: Not specified in the given structs

Event Routes

  • /event (GET)
    • Query: EventId (id: i32)
  • /event (POST)
    • Data: CreateEvent (name, description, mode, venue, domain_id, prize, points, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link)
  • /event (DELETE)
    • Data: DeleteEvent (id: i32)
  • /event (PATCH)
    • Data: ChangeEvent (id, name, description, mode, venue, prize, points, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link - all optional except id)
  • /event/coordinator (GET)
    • Query: GetEventStudentCoordinator (id: i32)
  • /event/coordinator (POST)
    • Data: AddEventStudentCoordinator (student_id: i32, event_id: i32)
  • /event/attendance/individual (GET, POST, DELETE)
    • Data: EventIndividualAttendance (user_id: i32, event_id: i32)
  • /event/attendance/team (GET, POST, DELETE)
    • Data: EventTeamAttendance (team_id: i32, event_id: i32)
  • /event/photo (GET, POST)
    • Data: Not specified in the given structs
  • /event/join/individual (POST)
    • Data: Not specified in the given structs
  • /event/join/team (POST)
    • Data: Not specified in the given structs

Workshop Routes

  • /workshop (GET)
    • Query: WorkshopId (id: i32)
  • /workshop (POST)
    • Data: CreateWorkshop (name, description, mode, venue, domain_id, points, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link)
  • /workshop (DELETE)
    • Data: DeleteWorkshop (id: i32)
  • /workshop (PATCH)
    • Data: ChangeWorkshop (id, name, description, mode, venue, ps_link, start_time, end_time, registration_start, registration_end, whatsapp_link - all optional except id)
  • /workshop/coordinator (GET)
    • Query: GetWorkshopStudentCoordinator (id: i32)
  • /workshop/coordinator (POST)
    • Data: AddWorkshopStudentCoordinator (student_id: i32, workshop_id: i32)
  • /workshop/photo (GET, POST)
    • Data: Not specified in the given structs
  • /workshop/join (POST)
    • Data: Not specified in the given structs
  • /workshop/attendance (GET, POST)
    • Data: WorkshopIndividualAttendance (user_id: i32, workshop_id: i32)

Team Routes

  • /team (GET)
    • Query: TeamId (id: i32)
  • /team (POST)
    • Data: TeamName (name: String)
  • /team (DELETE)
    • Data: TeamId (id: i32)
  • /team (PATCH)
    • Data: ChangeTeam (id: i32, name: Option)
  • /team/member (GET, DELETE)
    • Data: MemberId (team_id: i32, student_id: i32)
  • /team/request (GET, POST, PUT)
    • Data: Not specified in the given structs

Note: For some routes, the exact data structures are not provided in the given struct definitions. These are marked as "Not specified in the given structs" or "Data: Not provided in the given structs".

About

THE Backend for techfest, hopefully for ever

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages