/FlexYoga

Primary LanguageHTMLApache License 2.0Apache-2.0

FlexYoga

Project Status: Active

Motivation

FlexYoga is a platform that will help users enrol themselves for Yoga classes. Some of the criteria considered for the same:

  • Age Limit: 18-65 years
  • Monthly Fee: ₹ 500
  • Batches: 4

Note: One cannot change batches after enrolling that month. They are allowed to alter batches next month.

Database Design Schema

Our Database consists of 3 tables

  • User Table
    • Stores User details such as Username, age, etc.
  • Batch Table
    • Stores details about the batches
  • Membership Table
    • Stores Membership details
    • Has a one-one relationship with the User table
      • One user can only hold one membership at a time
      • That membership can only be linked with one user
    • Has a many-one relationship with the Batch table
      • A batch can be linked with multiple memberships
      • Two or more memberships can be linked with the same batch

ER Diagram

ER Diagram

Process and Steps

  • User creates an account. Only users within the age range of 18-65 are allowed to do the same
  • Once they have logged into their account, they have two options: register or view their user details.
  • User details will display when they last registered and their current membership status.
  • The web app will give the batch details in the registration form. The user has to select a batch and complete the payment.
  • A user who has already enrolled for the month will not be able to enrol again that month. They will have to wait till next month to enrol again (i.e. change batches)
  • By enrolling, we mean booking a slot (for that month).
  • Every time the user logs in, the application will update the membership status by checking whether the validity of their membership has expired. (This could be an area of improvement)
  • User can log out once they are done.

Points to Note

  • We are only allowing a user to enrol once a month. (An alternative could be to let them unenroll that month and then again re-enrol but in the same batch)
  • To ensure that only users within the 18-65 age group enrol, we have put an age limit condition while registering.
  • Users can securely log in and out of their account using their username and password. This way, one's enrollment is only in their hands.

Further Improvements / ToDo

  • Automate Script to remove membership from the database, at the end of the month. (Currently doing it using Flask, would like to create a Database Stored Procedure)

API Endpoints

  • To add/register a user
    /login [POST]
    
  • To enrol a user
    /membership [POST]
    
  • To view current user details
    /details [GET]
    

Running Locally

  • Clone the GitHub repository
$ git clone git@github.com:Pranav1007/FlexYoga.git
  • Move to the Project Directory
$ cd FlexYoga
$ make python-packages
  • Start the local flask server
$ make run

Sample UI Demo

Details Page

Detials Page

User Enrollment Page

Enrollment Page

License

License
This project is under the Apache-2.0 License License. See LICENSE for Details.

Done By


Pranav B Kashyap