Skip to main content
@kneeraazon
Client WorkWeb Apps & SaaSCase Study

Built for B2B Directories · Django REST · Nuxt 4 · PostgreSQL · nginx

Clarity Enterprise

A searchable directory of companies. A Django REST API holds the companies, tags, sub-tags, regions and founders, with an admin for editing them. A server-rendered Nuxt 4 app shows them as a list with a text filter, combinable tag, sub-tag and region filters, Load More paging and a page per company. Descriptions written in the admin are sanitised on the way out, so saved markup cannot run script for visitors.

OUTCOME.01158Companies in the directory fixture
OUTCOME.02120Backend tests passing
OUTCOME.0396%Backend test coverage
2D SYSTEM TOPOLOGY // END-TO-END REQUEST PIPELINE4-STAGE DATA FLOW

Company Data → Django API → Nuxt SSR → Directory UI

FIG.01 // INTERFACE & SYSTEM CAPTURE1 / 9
The Clarity directory: tag, sub-tag and region filters on the left, a text filter above, and a list of companies with an initial-letter placeholder logo, a short description and tag chips.
The Clarity directory: tag, sub-tag and region filters on the left, a text filter above, and a list of companies with an initial-letter placeholder logo, a short description and tag chips.

Role

Full-Stack Architect

Duration

5 weeks

Tech Stack

Python 3.13Django 5.2 LTSDjango REST frameworkNuxt 4Vue 3PiniaTailwind CSS 3PostgreSQL 17 / SQLitenginxDockerpytestVitest
SECTION 01 // PROBLEM STATEMENT

The Problem

A company directory has two audiences for one dataset: visitors who want to search and filter it, and staff who need to edit it, with rich-text descriptions and internal notes, without ever breaking the public pages.

The repository started as a Django 4.1 API and a Nuxt 3.1 web app with 3,880 tracked files, of which about 60 were source: the rest was generated files, 777 uploaded logos and a committed database. It also shipped a secret key written in the settings, ran in debug mode, let anyone read the staff's internal notes through the API, and rendered stored HTML from the admin straight into the pages.

SECTION 02 // SYSTEM ARCHITECTURE & EXECUTION

My Approach

  1. API. Django 5.2 LTS with Django REST framework: read-only public endpoints for companies, tags, sub-tags, regions and founders, OpenAPI documentation, and a health endpoint.
  2. Admin. A Django admin in the Jazzmin theme with a rich-text editor for descriptions, CSV import and export, and internal notes on each company that only staff can read.
  3. Web app. A server-rendered Nuxt 4 app: the directory with a text filter, combinable tag, sub-tag and region filters and Load More paging, a page per company with a breadcrumb, and a branded 404.
  4. Security. The API's default permission is now staff-only, and the public directory views opt in to open access. Only session authentication, cross-origin calls only from configured origins, every secret from the environment, and the description HTML sanitised on output (no scripts, event handlers, styles or javascript links).
  5. Delivery. Non-root Docker images, a compose stack on PostgreSQL 17 with nginx serving the uploaded logos, and CI.
  6. Clean-up. Generated files, uploaded logos and the committed database were taken out of version control, and a fixture keeps the 158 companies, tags and regions.
SECTION 03 // VERIFIED OUTCOMES

Results & Impact

Re-run on 2026-11-14 in a scratch copy: the backend's 120 tests pass with 96% coverage, the frontend's 23 tests pass, and the Nuxt production build completes.

The app was also run locally on that date: migrations and the 158-company fixture loaded into SQLite, the Django API on one port and the Nuxt server on another. In the browser the tag P2P narrowed the list to one company, a text search for 'payments' returned matching companies, Load More took the list from 10 to 20, a company page rendered, and the admin login, company list and edit form worked.

Recorded in the repository's work-done.md (2026-11-01): a production-style gunicorn run with debug off redirected plain HTTP to HTTPS, answered the health check and returned 158 companies; the staff-only endpoints answer 403 to anonymous callers and ordinary users and 200 to staff; the backend and proxy images build and the 120 tests pass inside the image; the development stack runs on PostgreSQL 17.11.

Not verified: the real company logo files, which are not in the repository (the local run used generated placeholder logos); the OpenAI description helper, which needs a key; which commit any deployed site is running.