This is the SA Connect application, designed to streamline the student assistant (SA) recruitment process for the WPI Computer Science Department. It allows students to apply for available SA positions, and enables faculty to create positions and review applications.
-
Student Portal
- Allows students to browse available SA positions in the Computer Science Department
- Enables students to submit applications directly for desired positions
- Tracks the application status in real-time
-
Faculty Portal
- Enables faculty to create and manage SA position postings
- Provides a dashboard to review, approve, or reject applications
- Allows customization of application criteria for each position
-
Authentication and Authorization
- Integrates Microsoft Azure Active Directory for secure login and authentication
- Role-based access control for students and faculty
-
Database Integration
- Supports local PostgreSQL for development environments
- Fully compatible with AWS RDS for production-grade database management
-
API Integration
- Integrates Microsoft Graph API for accessing user details
-
Dockerized Deployment
- Offers a Docker setup for seamless local and production deployments
- Simplifies running the application in isolated containers
-
AWS EC2 Support
- Optimized for deployment on AWS EC2 instances
- Configured to work with AWS RDS for production-ready database management
To set up this application on your local machine, follow these steps:
git clone https://github.com/<your-username>/sa-connect.gitcd sa-connect
2. Set up a virtual environment (Optional but recommended): If you're using Python 3, create and activate a virtual environment:
python -m venv venvvenv\Scripts\activate
pip install -r requirements.txt
Create a .env file in the root of the project directory and add the following configurations:
- AUTHORITY:
https://login.microsoftonline.com/<tenant-id> - CLIENT_ID:
<your-client-id>
-
AWS EC2 (Production)
AWS_EC2=postgresql+psycopg2://<username>:<password>@<aws-rds-endpoint>/<database-name>
-
Local Database (Development)
DATABASE_URL=postgresql://<username>:<password>@localhost:5432/sa_connect
ENDPOINT=https://graph.microsoft.com/v1.0/me
Microsoft Authentication Configurations: These values are necessary for integrating Microsoft Authentication (e.g., login) using Azure AD.
AWS EC2 Database (Production): If deploying on AWS EC2 with AWS RDS, set the AWS_EC2 value to the connection string for your PostgreSQL RDS instance.
Local Database (Development): If running the app locally, the DATABASE_URL will be used to connect to your local PostgreSQL database.
Microsoft Graph API Endpoint: The ENDPOINT is used for fetching user details from Microsoft Graph API.
The application is configured to work with AWS RDS for production environments and SQLite for local development.
-
AWS RDS:
- If you plan to deploy the app on AWS EC2 and use AWS RDS, you will need to create an RDS instance (e.g., MySQL or PostgreSQL) and update the
config.pyfile with the corresponding RDS connection string. - Example configuration for RDS (MySQL):
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://<username>:<password>@<hostname>:<port>/<database>'
- If you plan to deploy the app on AWS EC2 and use AWS RDS, you will need to create an RDS instance (e.g., MySQL or PostgreSQL) and update the
-
Local Database:
- For local development, the app will connect to a local PostgreSQL database using the
DATABASE_URLfrom the.envfile.
- For local development, the app will connect to a local PostgreSQL database using the
The application can be easily deployed using Docker for both development and production environments.
Steps to run the application using Docker:
- Build the Docker image: Run the following command to build the Docker image
docker build -t sa_connect .
- Run the Docker container: Use the following command to run the application in a Docker container:
docker run -p 5000:5000 sa_connect
This will start the application inside a Docker container, and you can access it at http://localhost:5000.
Note: Make sure that your AWS RDS connection is properly configured when running in Docker for production environments.
To deploy the application to AWS EC2:
- Set up an EC2 instance (e.g., Ubuntu-based instance).
- SSH into the EC2 instance and clone the repository:
git clone https://github.com/<your-username>/sa-connect.git
- If you're using AWS RDS, make sure to configure the
config.pyfile with the appropriate RDS connection string. - Start the Flask application for production use.
To start the application locally, run:
flask run
This will start the server on http://localhost:5000. You can now access the application in your web browser.