Skip to content

m-berggren/WeFix

Repository files navigation

WeFix

Table of Contents

  1. Introduction
  2. Tech Stack
  3. Get Started
  4. System Overview
  5. UI Design
  6. Continuous Integration
  7. Contributions

Introduction

WeFix is a full-stack web application that allows users in all of Sweden to easily find and book dental appointments that best align with their needs and schedules. Users can navigate an integrated map to find their nearest dental clinic, and then proceed to view and book available appointment slots. Booked slots appear in a personal appointments calendar where the user can view their bookings as well as have the option to cancel their appointments. The system includes a notification system where email notifications are sent containing booking or cancellation confirmations.

The solution is based on a distributed system that includes several architectural styles such as Service-Oriented Architecture, Publish-Subscribe pattern for communication and Client-Server between the client UIs and backend.

Tech Stack

WeFix uses a variety of modern technologies to provide a robust and scalable system. Below is a list of the key tools and frameworks that make the project:

Get Started

Prerequisites

  • Node.js v18 or later
  • Docker and Docker Compose/ Docker Desktop
  • MongoDB handled via Docker
  • HiveMQ handled via Docker
  • npm, comes with Node.js

Running application

  1. Clone the repository
  2. Set up environment variables
    • copy .env.example files in root folder and if you intend to use BankID for patients: middleware/services/user-management-service
  3. Install dependencies in all nodes
    • cd into each service and api-gateway and run npm install
  4. Start docker containers
    • docker-compose --profile all up --build -d

Running the command with all flag will build 20 containers. These containers are:

  • One Nginx load balancer with two API gateways
  • One Haproxy load balancer with three HiveMQ MQTT brokers
  • One container each for clinic-management-service, notification-service and monitoring-service
  • Three containers each for user-management-service and appointment-service
  • Three instances of MongoDB databases
  • One container used for integration testing locally with Postman files

There are also additional profiles available such as k6 for stress-testing the system, client for launching the clients in production and test for running local integration tests through a Postman collection. k6 creates a K6 container that starts running tests, an InfluxDB container that stores the time-series data from the tests and a Grafana container that pulls the metrics from InfluxDB and displays it with graphs that are accessible through port 3010 in the browser.

System Overview

Here is a short description of the system overview and architecture.

Entity-Relationship (ER) Diagram ER Diagram
Component Diagram Component Diagram

UI Design

The following images illustrate the UI design of our two frontend clients. The Patient Interface is for patients to view clinics on a map, find and book appointments and manage their own bookings. The Dentist Interface is utilized by dentists who post or remove new available appointment slots in specified clinics.

Patient Interface Patient Interface
Dentist Interface Dentist Interface

Continuous Integration

The system implements a robust CI/CD pipeline using Gitlab to ensure code quality and reliability. It consists of three main stages:

  1. Lint Stage - All pushes
  2. Build Stage - Merge Requests & Main branch
  3. Test Stage - Merge Requests & Main branch

The pipeline is designed not to exhaust the available runners with every push to the repository, so the linting stage runs on every push but the build and test phase will only run on merge requests and in main branch. Furthermore, here we utilize docker containers to provide isolated and reproducible test environments, much similar to docker-compose setup used throughout the development of the project.

The test strategies used in the test stage are unit tests on each service and from API gateway integration tests through a Postman collection.

Development Team

Name Gitlab email
Claudia Sevilla Eslava sevillaeslava@gmail.com
Julia McCall mccall@student.chalmers.se
Lian Shi lians@student.chalmers.se
Marcus Berggren marbergg@student.chalmers.se
Kristina Trampush gustramkr@student.gu.se

About

A full-stack student project for booking and handling dental appointments in a distributed system.

Topics

Resources

License

Stars

Watchers

Forks

Contributors