Repository overview
The root directory contains two main workspaces:Each workspace (
api/ and client/) has its own package.json, dependencies, and build configuration, allowing them to be developed and deployed independently.API directory structure
Theapi/ directory contains the NestJS backend application built with TypeScript and TypeORM.
Root level
Source directory (api/src/)
modules/
modules/
Contains feature modules organized by domain:
- artists/ - Artist management endpoints and services
- auth/ - Authentication and authorization logic
- labels/ - Record label management
- lyrics/ - Track lyrics management
- releases/ - Music release management
- roles/ - Role and permission management
- users/ - User account management
- Controllers (handle HTTP requests)
- Services (business logic)
- DTOs (data transfer objects)
entities/
entities/
TypeORM entity definitions that map to database tables:
abstract.entity.ts- Base entity with common fieldsuser.entity.ts- User accountsartist.entity.ts- Artist profileslabel.entity.ts- Record labelsrelease.entity.ts- Music releases (albums, singles)track.entity.ts- Individual trackslyrics.entity.ts- Track lyricsrole.entity.ts- User rolespermission.entity.ts- System permissionsrolePermission.entity.ts- Role-permission mappingsreleaseArtist.entity.ts- Release-artist relationships
common/
common/
Shared utilities and cross-cutting concerns:
- decorators/ - Custom TypeScript decorators
- filters/ - Exception filters for error handling
- guards/ - Authentication and authorization guards
constants/
constants/
Application constants and enums:
- Authentication roles and permissions
- Artist and user statuses
- Location data (countries, languages)
helpers/
helpers/
Helper functions and utility classes for common operations throughout the application.
types/
types/
TypeScript type definitions:
- models/ - Interface definitions for data models
- Common types used across the application
seeds/
seeds/
Database seeding scripts to populate initial data for development and testing.
utils/
utils/
Utility functions and helper methods.
Configuration files
Configuration files
app.module.ts- Root application modulemain.ts- Application entry pointdata-source.ts- TypeORM data source configuration
Client directory structure
Theclient/ directory contains the React frontend application built with Vite, TypeScript, and Tailwind CSS.
Root level
Source directory (client/src/)
pages/
pages/
Page components organized by feature:
- landing/ - Landing page components
- authentication/ - Login and registration pages
- dashboard/ - Dashboard views
- artists/ - Artist management pages
- labels/ - Label management pages
- releases/ - Release management pages
- lyrics/ - Lyrics management pages
- roles/ - Role and permission pages
- common/ - Shared page components
components/
components/
Reusable React components:
- ui/ - Base UI components (shadcn/ui)
- layout/ - Layout components (header, sidebar, footer)
- inputs/ - Form input components
- modals/ - Modal dialogs
- table/ - Table and data grid components
- graphs/ - Chart and visualization components
- feedbacks/ - Loading, error, and success states
- text/ - Typography components
- landing/ - Landing page specific components
state/
state/
Redux state management:
- api/ - RTK Query API definitions
- features/ - Redux slices for different features
- Store configuration and setup
hooks/
hooks/
Custom React hooks:
- common/ - Shared hooks
- labels/ - Label-related hooks
- lyrics/ - Lyrics-related hooks
- releases/ - Release-related hooks
types/
types/
TypeScript type definitions:
- models/ - Data model interfaces matching API entities
- Component prop types
- Utility types
constants/
constants/
Frontend constants including:
- API endpoints
- Route paths
- Configuration values
utils/
utils/
Utility functions for:
- Data formatting
- Validation helpers
- API request helpers
containers/
containers/
Container components that connect pages to state management.
outlets/
outlets/
React Router outlet components for nested routing.
lib/
lib/
Third-party library configurations and wrappers.
Root files
Root files
App.tsx- Root application componentRouter.tsx- Application routing configurationmain.tsx- Application entry pointindex.css- Global styles and Tailwind imports
Technology stack
Backend (API)
NestJS
Progressive Node.js framework for building efficient server-side applications
TypeORM
Object-relational mapper for TypeScript and JavaScript
PostgreSQL
Powerful open-source relational database
JWT
JSON Web Tokens for authentication
@nestjs/core- NestJS framework core@nestjs/typeorm- TypeORM integration@nestjs/jwt- JWT authenticationbcrypt- Password hashingclass-validator- Validation decoratorspg- PostgreSQL driver
Frontend (Client)
React
Popular library for building user interfaces
Vite
Next-generation frontend build tool
Redux Toolkit
State management with Redux made simple
Tailwind CSS
Utility-first CSS framework
react&react-dom- React library@reduxjs/toolkit- State managementreact-router-dom- Client-side routing@radix-ui/*- Accessible UI primitivestailwindcss- Styling frameworkreact-hook-form- Form handlingrecharts- Data visualization
Development workflow
Start development servers
Run both API and client servers using
./dev.sh or manually in separate terminals.Related resources
Development setup
Set up your local development environment
Database schema
Explore the database structure and relationships
Environment variables
Configure your application settings
API reference
API endpoints and usage documentation