Skip to main content
Paula Farrugia

Freelance project

Client management system

A web system that lets an independent optician track clients, prescriptions and spectacle jobs, and see sales figures. It took the shop from paper and spreadsheets to one system they can open from anywhere.

The Clients list, with search, an Add Client button and columns for contact details, locality, date added and jobs.
The Clients list: search by name, email or phone, and see open jobs at a glance.
  • ClientAn independent optician
  • My roleSole full-stack developer
  • Timeline2021 – 2023
  • TypeFreelance

01

Overview

The brief and the goal.

The shop kept client records and spectacle jobs on paper and in spreadsheets, so sales staff were entering the same details twice. The owner wanted one system to hold clients and prescriptions, move each job through its stages, and show statistics and data about their clients and sales.

Success meant going fully online with no manual copying, and giving the manager something they could check from a phone or laptop.

02

My role

What I owned and who I worked with.

  1. 01Built the whole system, front end and back end, from 2021 onwards.
  2. 02Designed a custom GraphQL API with rate limiting, restricted CORS and Auth0 token checks on every request.
  3. 03Worked directly with the owner on what the shop needed, with a designer joining our meetings to gather client requirements and work on the designs.

03

How it’s built

The stack and how the pieces fit.

  • Front endNext.js, React, styled-components, Apollo Client
  • Back endNode.js, Apollo Server, Mongoose
  • DataMongoDB, MongoDB Charts
  • HostingVercel
Architecture diagram. The front end sends GraphQL requests with a token to the API, which runs Mongoose queries on the database. Auth0 signs staff in and issues the token, which the API checks. MongoDB Charts reads sales data from the database for the Stats page.
Architecture diagram. The front end sends GraphQL requests with a token to the API, which runs Mongoose queries on the database. Auth0 signs staff in and issues the token, which the API checks. MongoDB Charts reads sales data from the database for the Stats page.
How the pieces connect: the front end only talks to the API, and the API is the only thing that touches the database.
The Jobs list with three jobs ticked, and Update Status and Input Remark buttons above the table.
Jobs move from Open to Collected, with status changes and remarks applied to several at once.

04

Why it’s built this way

The decisions that shaped it.

  1. 01A custom GraphQL API instead of Realm’s built-in oneThe first version used MongoDB Realm’s built-in GraphQL. I later replaced it with my own, to add rate limiting and restricted CORS, and to write the queries the shop needed: search, client totals and overall stats.
  2. 02Auth0 tokens instead of custom JWTsAuth0 handles sign-in and passwords, so the system stores none.
  3. 03Embedded MongoDB Charts instead of hand-built chartsCharts are set up in a visual editor, so they’re easy to change. MongoDB’s tool made it easy to add and remove charts and to create queries on the data, without reinventing the wheel.

05

Gallery

Screens and details.

06

Outcome

What changed, and what I’d do differently.

Data was imported by hand at first, and the shop has been positive about the system since. It’s still in use and I still maintain it when needed, and the owner has asked for it to be set up for a second shop.

What I’d do differently

  1. 01Build it white-label from the start, so a second shop is a setup task rather than a code change.
  2. 02Write the tests first.
  3. 03Add monitoring from day one.
  4. 04Keep a written log of the decisions agreed with the client.

Have a project in mind?