Skip to content

shurasfate/BU-Systems-Development

Repository files navigation

BU-Systems-Development

Overview

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.

Features

  • 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

Environment Variables

  • Use the env example file to see the format

  • Please get the environment variables from the report

Databases

MongoDB

  • Used for semi-structured and unstructured data:

  • Texture packs

  • Users

  • User libraries

  • Cloud-wide event logs

SQLite

  • Used for structured event logging

  • Event table

  • Tracks login, views, changes and checkout

Security

  • 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

Cloud Services

Google App Engine

  • Hosts the Flask web application

  • Handles scaling and deployment

Google Cloud Functions

  • Used to send confirmation emails

  • Decouples email logic from the main app

SendGrid

  • Email delivery service

  • Sends simulated purchase confirmation emails

Testing

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

Deployment

Local

flask --app main run

Cloud

gcloud app deploy

Cloud Function

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=""

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published