This API provides with various endpoints serve the following features:
- Register new alumni with "firstname", "lastname", "emailaddress", "studentid" and "password".
- Login of a registered user. On getting correct credentials i.e emailaddress and password, a limited time token is generated for authenticated requests.
- Logged in alumni can view and download their transcripts and certificates. They also have access to a unique document number which can be provided to external users.
- Any unauthenticated user (external user), if provided with a document number, can download the document.
- Registred admin user can register another admin user.
- The application is based of FastAPI framework.
- The application has a database layer which can easily configured to work with a database of choice.
- Currently uses dynamodb as a database. This example can be used to develop integration with other databases.
- The application uses AWS S3 bucket for file storage and retrival.
- A docker image can be created with the provided dockerfile.
Steps to install and start the application on local environment:
-
Install required python packages.
NOTE: You may create and activate a virtual environment to decouple and isolate dependencies.
pip install -r requirements.txt -
Start the app with uvicorn and automatic reload enabled by:
uvicorn app.main:app --reload
This will start the application on the default port 8000
-
To create a docker image run the following command:
docker build -t <name_of_image> . -
Build container:
docker run -d -e AWS_DEFAULT_REGION=<default_aws_region> --name <name_of_container> -p 8000:8000 <name_of_image>