-
Notifications
You must be signed in to change notification settings - Fork 1
Code Documentation
Veevek Dave edited this page Apr 25, 2024
·
14 revisions
- Architecture
- Model
- The Model corresponds to the structure of the data stored in the database. It defines the type of data stored within the database. The model corresponds with the Controller and Database Component.
- Controller
- Controllers act as an interface with the Model component to process all the business logic and incoming requests, manipulate data using the Model component and interact with the Views to render the final output.
- Migrations
- Migrations are a way of versioning the database schema and managing its evolution over time.
- Jobs
- Jobs, refer to operations or tasks that are executed outside the main flow of a web application, usually asynchronously
- Examples - sending emails, processing files, scheduling tasks
- Swift
- Swift is an open-source programming language created by Apple for building apps for Apple devices, including iOS, Mac, Apple TV, and Apple Watch.
- Read more:
- Documentation:
- Vapor
- Vapor is an open source web framework written in Swift. It can be used to create RESTful APIs, web apps, and real-time applications using WebSockets. In addition to the core framework, Vapor provides an ORM, a templating language, and packages to facilitate user authentication and authorization.[4]
- Read more:
- Vapor Documentation:
- Fluent:
- Fluent is an ORM framework for Swift. It takes advantage of Swift's strong type system to provide an easy-to-use interface for your database. Using Fluent centers around the creation of model types which represent data structures in your database. These models are then used to perform create, read, update, and delete operations instead of writing raw queries.
- Documentation:
- The shuttle tracker has the following controllers:
- Analytics:
- Responsible for calculating the average number of users per bus at any given moment
- userIDs returns all the the unique IDs based on the shuttle
- BusAvg calculates the avg number of people boarded on a shuttle
- AnalyticsEntries
- Registers routes on the index path of its provided routes builder
- Saves the analytics of e
- AnalyticsEntry
- Registers routes for managing individual analytics entries.
- Returns all the entries
- AndroidRedirects
- Registers routes for redirects to the Android app
- Redirects user to shuttle app on the android store
- Announcement
- Registers routes for managing individual announcements.
- Read() receives all the announcements by ID
- Delete deletes the announcement based on announcementID
- Announcements
- Structure that registers routes for managing individual announcements.
- Returns all announcements based on the ID
- Deletes the particular announcement based on ID
- Bus
- A structure that registers routes for managing individual shuttle buses.
- Returns all shuttle locations
- Updates shuttle location
- Updates when a shuttle is boarded and left
- Analytics:
Endpoints: Parameters: Responses:
- AnalyticsEntries
Endpoints: Parameters: Responses:
- AnalyticsEntry
Endpoints: Parameters: Responses:
- AndroidRedirects
Endpoints: Parameters: Responses:
- Announcement
Endpoints: Parameters: Responses:
- Announcements
Endpoints: Parameters: Responses:
- Bus
Endpoints: Parameters: Responses:
- Buses
Endpoints: Parameters: Responses:
- DataFeed
Endpoints: Parameters: Responses:
- Log
Endpoints: Parameters: Responses:
- Logs
Endpoints: Parameters: Responses:
- Milestone
Endpoints: Parameters: Responses: