Simple web application for employees to submit requests for leave and and for managers to approve/decline the requests.
- Frontend: HTML / CSS / Bootstrap4 / JS
- Backend: Flask / SQLAlchemy as ORM / sqlite3
- Different packages used are mentioned in the requirements.txt file
- Install requirements:
pip install -r requirements.txt
- Populate db:
python -m app.populate_db
- Run Server:
python app_runner.py
You can run the server without the first step but it is better to populate db with new requests to approve/decline them
Employee ID | Employee Name | Employee Email | Password | Manager ID |
---|---|---|---|---|
1 | Ahmed | [email protected] | pass123 | 3 |
2 | Aly | [email protected] | 123pass | 1 |
3 | Mohamed | [email protected] | pass123 | none |
4 | Ashraf | [email protected] | 123pass | 1 |
5 | Ibrahim | [email protected] | 123pass | 3 |
- No normal registration scenario, only admins register accounts
- Each employee have only one direct manager, managers would manage multiple employees ofcourse
- Managers can make leave request from their managers
- When an employees submit a leave request they must specify the reason behind that
- A manager would approve/decline incoming leave requests
- Migration repo for db (for safe upgrading and downgrading db)
- passwords' hash are being stored in the db instead of actual passwords
- User Sessions and db are secure by generating safe APP_KEY (in the config)
- Some routes won't work if accessed without logging in
- Logging in
- Submiting a leave request
- As an employee I can see previous requests I made and see what was their status (unanswered, approved, declined)
- As a Manager I can view incomming requests and approve/decline them
- I wanted to additional admin functionality like viewing statistics, add/delete users, assigning employees to managers (I have made some of utility functions in the handlers' modules to support those features but didn't have enough time)
- The whole code base is well commented, and the above arch diagram pretty much describes the project flow
- Didn't have time for further documentation