https://github.com/raguggg/admission-application-tracker
A web application built with Flask allowing students to submit admission applications, with an admin interface to review, approve, and generate PDF admission letters.
https://github.com/raguggg/admission-application-tracker
flask flask-api interview
Last synced: 8 months ago
JSON representation
A web application built with Flask allowing students to submit admission applications, with an admin interface to review, approve, and generate PDF admission letters.
- Host: GitHub
- URL: https://github.com/raguggg/admission-application-tracker
- Owner: Raguggg
- Created: 2025-02-02T14:35:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-02T15:01:42.000Z (over 1 year ago)
- Last Synced: 2025-02-02T15:31:20.320Z (over 1 year ago)
- Topics: flask, flask-api, interview
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# University Admission Application System ππ
## Project Overview π
This project is a Flask-based web application designed to handle university admission applications. It offers two main interfaces:
- **User Interface** π§βπ: Allows applicants to create and submit their admission application, upload required documents, and download an admission letter upon approval.
- **Admin Interface** π οΈ: Enables administrators to manage courses, document types, and review or update the status of submitted applications. Administrators can also toggle the application acceptance period.
The application utilizes Flask for the backend, Flask-Login for authentication, Flask-Migrate for database migrations, and Flask-RESTx for API documentation and endpoint creation. SQLAlchemy is used as the ORM layer, with SQLite used by default (configurable to other databases like PostgreSQL or MySQL).
## Installation Instructions ποΈ
Follow these steps to install and run the application locally:
1. **Clone the repository**:
```bash
git clone https://github.com/Raguggg/admission-application-tracker.git
```
2. **Navigate to the project directory**:
```bash
cd admission-application-tracker
```
3. **Sync dependencies**:
- If youβre using `uv`, run (recommended):
```bash
uv sync
```
- Otherwise:
1. Create a virtual environment:
```bash
python -m venv venv
```
2. Activate the virtual environment:
- On macOS/Linux:
```bash
source venv/bin/activate
```
- On Windows:
```bash
venv\Scripts\activate
```
3. Install all packages
```bash
pip install .
```
4. **Configure Environment Variables (Optional) π**:
The default configuration is set in the `dev_config` object. For production, you may wish to set environment variables (e.g., `SECRET_KEY`, `SQLALCHEMY_DATABASE_URI`) and create a separate configuration module.
5. **Database Setup ποΈ**:
The application uses Flask-Migrate to handle database migrations. Run the following commands to set up the database:
```bash
flask db init
flask db migrate
flask db upgrade
```
Alternatively, the application factory calls `db.create_all()` to create tables if they do not exist when running in development mode.
6. **Run the Application π―**:
Start the Flask development server:
```bash
flask run
```
Visit [http://127.0.0.1:5000/hello](http://127.0.0.1:5000/hello) to see a simple greeting page. API documentation is available at [http://127.0.0.1:5000/api/docs](http://127.0.0.1:5000/api/docs).
## Feature Plan & Implementation π§
1. β³ Add test cases for application APIs
2. β³ Handle form closure automatically after the deadline
3. β³ Create a web UI for user interactions
4. β³ Implement Celery for generating PDF files
5. β³ Dockerize the code with all necessary tools
## Usage Instructions π
### For Applicants (Users) π¨βπ
- **Register & Login** π:
- Use the `/register` endpoint to create a new account.
- Log in using the `/login` endpoint.
- **Submit an Application** π:
- Once logged in, navigate to the `/user/applications` endpoint (POST) to create your application. Ensure all required fields are provided.
- After creating the application, you can check its status by calling `/user/status` (GET).
- **Upload Documents** π€:
- Upload required documents via `/user/documents/upload` (POST). Once all required documents are uploaded, the application status automatically updates to `PENDING`.
- **Download Admission Letter** π©:
- If your application status is updated to `APPROVED` and an admission letter has been generated, download it from `/user/letter` (GET).
### For Administrators π’
- **Admin Login** π:
- Admin accounts (e.g., the default admin user with email `admin@gmail.com` and password `admin`) can log in using the same login endpoint.
- Only logged-in administrators have access to admin-specific endpoints.
- **Manage Courses** π:
- List all courses using `/admin/courses` (GET).
- Create a new course using `/admin/courses` (POST).
- **Manage Document Types** π:
- List document types using `/admin/documents` (GET).
- Create new document types via `/admin/documents` (POST).
- **Review and Update Applications** π:
- Retrieve all submitted applications using `/admin/applications` (GET).
- Change the status of a particular application (e.g., to approve or reject an application) using `/admin/applications//status` (PUT).
- When an application is approved, an admission letter is generated automatically.
- **Toggle Application Acceptance** π:
- Enable or disable the overall application acceptance (with optional start and end dates) using `/admin/acceptance` (PUT).
## Testing π§ͺ
To run tests (if applicable), follow these steps:
1. **Install Test Dependencies** π¦:
If not already included, install testing libraries such as `pytest`:
```bash
pip install pytest
```
2. **Run the Test Suite** π―:
Execute all tests by running:
```bash
pytest
```
Ensure your test database is properly configured in your testing configuration. Tests should cover functionality such as user registration, application submission, document uploads, and admin operations.
## Technology Stack π οΈ
- **Backend Framework:** Flask
- **API Documentation:** Flask-RESTx (Swagger UI)
- **Database ORM:** SQLAlchemy
- **Database Migration:** Flask-Migrate
- **Authentication:** Flask-Login
- **Data Validation:** Pydantic
- **PDF Generation:** reportlab
- **Testing:** Pytest
## CI/CD Pipeline π
We have a GitHub Actions workflow set up for continuous integration and deployment (CI/CD). This workflow automatically runs `pytest` in a cloud environment on every push to the repository.
#### Workflow Overview:
- **Trigger:** The workflow runs on every push and pull request to the main or feature branches.
- **Tests:** It executes `pytest` to ensure all unit tests pass before merging changes.
This setup helps maintain code quality and ensures that new changes do not break existing functionality.
## π¨βπ» Developer
**π Name:** RAGU G
**π§ Email:** [ragu19062002@gmail.com](mailto:ragu19062002@gmail.com)
**π Phone:** [+91 7598226670](tel:+917598226670)