This project is a cloud-based web application that simulates an online Minecraft texture pack store. Users can browse packs, view details, add packs to a personal library, and simulate purchases. The system demonstrates cloud deployment, data persistence, security, REST APIs, and cloud services.
-
User registration and login
-
Browse texture packs stored in MongoDB
-
View individual pack details
-
Add/remove packs from a personal library
-
Simulated checkout with confirmation
-
Admin event logs dashboard
-
Email confirmation via Google Cloud Function + SendGrid
-
Bootstrap-based UI
-
Use the env example file to see the format
-
Please get the environment variables from the report
-
Used for semi-structured and unstructured data:
-
Texture packs
-
Users
-
User libraries
-
Cloud-wide event logs
-
Used for structured event logging
-
Event table
-
Tracks login, views, changes and checkout
-
Passwords are hashed using Werkzeug
-
User sessions are protected with a Flask secret key
-
Login required for library, checkout, and admin pages
-
Admin logs restricted to authenticated users
-
API keys and secrets stored using environment variables
-
Hosts the Flask web application
-
Handles scaling and deployment
-
Used to send confirmation emails
-
Decouples email logic from the main app
-
Email delivery service
-
Sends simulated purchase confirmation emails
This project uses Pytest to conduct a set of unit tests which include:
-
Authentication
-
Page loading
-
API repsonse
-
Library behaviour
-
Checkout logic
python3 -m pytest tests/ -v
flask --app main run
gcloud app deploy
Before running the gcloud command please change into the cloud functions directory
gcloud functions deploy send_email \
--gen2 \
--runtime python312 \
--region europe-west2 \
--source cloud-functions/send-email \
--entry-point send_email \
--trigger-http \
--allow-unauthenticated \
--set-env-vars \
SENDGRID_API_KEY="",FROM_EMAIL=""