Home Inventory App
- School project
- 09/2024 → 07/2025 (1 day per week)
- Frontend source code
- Backend source code
Project Overview
This project was completed as part of the RNCP certification Application Developer Designer, in collaboration with Pierre Pedrono.
It consists of building a web application called Home Inventory App, aimed at helping users list, organize, and categorize their personal items in a structured way. The app also aims to simplify sharing and collaborative management within a household or between multiple users.
The main goal was to create an intuitive, functional application tailored to real user needs for managing personal belongings.
Tech Stack and Tools
- Figma
- Next.js
- shadcn/ui
- Tailwind CSS
- Axios
- Prisma ORM
- PostgreSQL
- Express.js
- Cypress
- Jest
- Coolify
Design
We first defined the key features through personas, then moved on to database architecture and wireframes.
The database design followed a progressive approach, starting from a Conceptual Data Model (CDM) to identify key entities and relationships (users, homes, rooms, items, media), and then translating it into a Logical Data Model (LDM).
Many-to-many relationships were normalized via junction tables (UserHome
, UserRoom
, etc.), enabling fine-grained permission management while ensuring data consistency. This structure facilitates multi-user collaboration and allows flexible item relocation between homes.
Created in Figma, the wireframes define the interface structure and user flows. They laid the groundwork for navigation, admin pages (dashboard, settings, forms), and helped validate usability before visual design.
The high-fidelity mockups turned wireframes into complete interfaces, incorporating the design system (Geist font, accessible colors, shadcn/ui components). Desktop and mobile versions were created and served as the direct basis for development.
Accessibility was prioritized at this stage, with sufficient contrast, clear hierarchy, and the use of components that follow accessibility standards (ARIA, semantic HTML, etc.).
Layered Architecture
The application follows a modular layered architecture, with a clear separation between the frontend and backend. The project is split across two Git repositories. This makes it easier to test or replace each part independently in the future.
Backend Structure
The backend is structured into distinct layers:
- Routes: define HTTP entry points (e.g.,
/api/items/:itemId
) - Middlewares: handle authentication, permissions (RBAC), validation, or data sanitization
- Controllers: contain business logic
- Models (via Prisma): handle database access
- Utils: reusable utility functions
Frontend Structure
The frontend adopts a hybrid approach, combining two methods. First, the Next.js app router system, which structures the organization of pages according to the application's folders. And secondly, a Domain-Driven Design (DDD)-inspired modular organization for everything else.
Each domain includes a standardized internal structure:
hooks
: Custom hooks related to the domaintypes
: TypeScript interfacesendpoints
: Contains API calls and exports them for use in hookscontext
: Provides a React context for shared state/functions across components
Implementation
We chose not to implement media/file upload due to time constraints (1 day per week).
Home administrators can create invite codes to let users join the home.
Users can, of course, delete their account, along with everything linked to it.
Security
User data security was integrated from the early stages of development. Authentication relies on a JWT-based system stored in secure, HTTP-only cookies to prevent XSS or CSRF attacks. On the backend, every sensitive route is protected by middlewares that check both the user's identity and permissions.
User input is sanitized automatically before being saved to the database via a sanitization middleware. Finally, all sensitive actions are double-checked — first in the frontend, then on the server — ensuring security against URL/API tampering.
Testing
The app includes unit tests on the backend and end-to-end (E2E) tests on the frontend. Backend tests (written in Jest) validate critical API functions like item retrieval or updates with permission checks. On the frontend, Cypress E2E scenarios cover full user flows like account creation, joining a shared home, or editing restrictions for items owned by others.
Deployment
The app is fully self-hosted on a VPS provided by Hetzner. Deployment is managed via Coolify, which simplifies container orchestration. The frontend, backend, and PostgreSQL database each run in separate containers. Improving service isolation and making maintenance easier.
A CI/CD pipeline is set up using GitHub Actions. On each push to main
or dev
, tests are run, code is auto-formatted, a build is generated, and if successful, a webhook triggers a redeploy on Coolify.
Improvements
- Media management
- Secure upload system
- Warranty tracking
- Backend cron job to detect upcoming warranty expirations
- Test coverage expansion
- Tech stack migration
- Next.js → more suitable React framework (no SSR or SEO needed)
- Custom auth system → Better-Auth
- Prisma ORM → Drizzle ORM? (for better performance)
- Add React Query for caching