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.
Company Data → Django API → Nuxt SSR → Directory UI

Role
Full-Stack Architect
Duration
5 weeks
Tech Stack
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.
My Approach
- 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.
- 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.
- 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.
- 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).
- Delivery. Non-root Docker images, a compose stack on PostgreSQL 17 with nginx serving the uploaded logos, and CI.
- 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.
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.