This document provides a complete overview of the QuillSpace project, including architecture, technology stack and step‑by‑step instructions to run the system locally - for development.
QuillSpace is a modern web platform designed as a flexible workspace / editor / dashboard system with:
- Strict separation between frontend and backend
- Well‑structured state management and data fetching
- A foundation that is easy to maintain and scale
The project consists of two main parts:
- Backend: Spring Boot (Java 17)
- Frontend: React 18, TypeScript, Vite, Tailwind CSS v4
[ React Frontend ] <── HTTP / JSON ──> [ Spring Boot Backend ] <──> [ PostgreSQL ]
- Backend acts purely as an API server
- Frontend handles UI, routing, authorization logic and state
- Database runs independently via Docker
- First, to run backend, please navigate to
backend.
- Java 17
- Spring Boot
- Gradle
- PostgreSQL
- Docker & Docker Compose
Before running the backend, make sure you have:
- JDK 17 installed and
JAVA_HOMEconfigured - Docker (Docker Desktop or Docker Engine) running
The backend uses PostgreSQL running inside a Docker container.
Start the database with:
docker-compose up -d- PostgreSQL will be exposed on port 5436
.\gradlew bootRun./gradlew bootRunThe backend will start on:
http://localhost:8080
Windows:
.\gradlew buildLinux / macOS:
./gradlew buildAfter building, the JAR file will be located in:
build/libs/backend-0.0.1-SNAPSHOT.jar
Run it using:
java -jar build/libs/backend-0.0.1-SNAPSHOT.jarIf you modify build.gradle (for example, add new libraries), refresh dependencies:
Windows:
.\gradlew build --refresh-dependenciesLinux / macOS:
./gradlew build --refresh-dependencies- First, to run frontend, please navigate to
frontend.
- React 19
- Vite 7
- TypeScript 5.8
- Tailwind CSS v4
- Radix UI
- Lucide React Icons
- Custom UI Kit (
src/uikit)
- TanStack Query (React Query)
- Redux Toolkit
- Axios (with interceptors)
- React Hook Form
- Zod
- Node.js LTS (v20+) recommended
- npm / yarn / pnpm
git clone <repository-url>
cd frontendnpm installnpm run devFrontend will be available at:
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run format- Run Prettier
src/
├── components/ # Shared application components
├── containers/ # Business logic & feature orchestration
├── core/ # Core configs (Axios, app setup)
├── hocs/ # Higher‑Order Components (Auth, Role, Permission)
├── hooks/ # Custom React hooks
├── layouts/ # App layouts
├── mock/ # Mock data for development
├── pages/ # Application pages
├── providers/ # Global providers (Redux, Query)
├── services/ # API services & query keys
├── store/ # Redux store & slices
├── uikit/ # Custom UI library (@uikit)
└── utils/ # Utility functions
Supported roles:
guestusermanageradmin
- Public Routes - Accessible by everyone
- Auth Routes - Only for non‑authenticated users
- Protected Routes - Require authentication and proper role
Located in src/hocs/:
withAuth- Requires authenticationwithGuest- Requires user to be logged outwithRole- Restricts access by rolewithPermission- Restricts access by permission
Example:
const AdminPage = withRole(UsersPage, { requiredRoles: ["admin"] });Used for:
- API data fetching
- Caching
- Background synchronization
- Optimistic updates
Key components:
BaseApiService- Centralized Query Keys
- Generic Query & Mutation hooks
Used for:
- Authentication state
- UI preferences (theme, sidebar)
- Permission lists
Main slices:
authSliceuiSlicepermissionsSlice
- Backend base setup with PostgreSQL
- Frontend architecture & routing
- Auth, Role, Permission system
- Redux Toolkit & React Query integration
- Base layouts & pages
- Connect backend APIs to frontend services
- Implement Profile & Settings pages
- Build Admin Users CRUD
- Harden security & error handling
- Components: PascalCase
- Hooks & utils: kebab‑case
- Types & Interfaces: PascalCase (no
Iprefix) - API methods:
get,create,update,delete - Boolean helpers:
is,has,should