StudyHub is an online tool that facilitates the development of efficient and productive study groups. It strives to bring together students who have similar study preferences, courses, and locations in order to improve collaborative learning experiences.
User Registration and Authentication: StudyHub provides a user-friendly registration process and secure authentication mechanism, allowing users to create accounts and access the platform securely:
User Profiles and Preferences: Users can create personalized profiles, including study preferences, courses, and availability schedules. This information is used to match users with compatible study groups:
Study Group Matching Algorithm: StudyHub employs a neural network-based matching algorithm that analyzes user preferences and behavior to suggest the most suitable study groups. This algorithm ensures optimal group formations based on compatibility factors.
Google OAuth 2.0 Integration: StudyHub integrates with Google OAuth 2.0 for seamless user authentication, enabling users to sign in using their Google accounts:
Email Verification: To ensure the authenticity of user accounts, StudyHub incorporates email verification functionality. Users receive email notifications to verify their email addresses during the registration process, this is done by using AWS SES and Twilio SendGrid:
API Security: StudyHub implements API security best practices, including JWT tokens and bcrypt hashing, to protect sensitive user data and ensure secure communication between the client and server.
Docker Containerization: The application is containerized using Docker, providing an isolated and portable environment for seamless deployment and scalability:
AWS and GCP Integrations: StudyHub integrates with AWS services such as DynamoDB, Lambda, and SES for email delivery, along with GCP Geolocation API for address verification:
Unit Testing: The codebase includes comprehensive unit tests for the REST APIs, ensuring functionality, reliability, and maintainability.
Note: If you're using Windows, please clone this repo in WSL and run the docker commands in there.
To clone and run this application you'll need:
Then on your terminal, run the following from the root of this repository:
# Build the images and containers then run the containers
docker compose up -d --build
In order to test the APIs of each endpoint at http://0.0.0.0:8080/, use Postman collections.
To stop the containers and to start the containers after the initial build:
# For stopping and removing the containers created above
# Use the -v flag to remove the associated volumes
docker compose down
# For creating and starting the container
# after the initial build
docker compose up -d
Run command in a container
To run shell command in any of the two containers:
docker compose exec <service-name> <command> <list-of-args>
# Example: Running SQL commands in the container
PGPASSWORD=<password> psql -U <username> <database>
# Example: Make backend migrations with Flask Migrations
docker compose exec backend flask db init
docker compose exec backend flask db migrate -m <migration-message>
docker compose exec backend flask db upgrade
We recommend creating alias(es) to shorten the above commands
Database is not up to date after running migration scripts
# By running this command, the database will be up to date with the latest migration
docker compose exec backend flask db stamp head
Import "{framework/library-name}" could not be resolved error from Pylance
If you're using VSCode and see this error. This mean the framework/library was not installed globally or installed in the virtual environment you're using. We highly recommend setting up a new virtual environment. So remove your existing environment in the root of this repository. Then run the following commands
# Ensure you are in the root of this repository
python3 -m venv env # Our gitignore assumes the virtual environment name is env
source env/bin/activate
pip install -r backend/requirements.txt
Then select the interpreter in env/bin/
. The issue should disappears.
Note: We assumed you're using MacOS or Linux. For Windows, please find the corresponding command for setting up Python virtual environment.