Skip to content

Project Structure

fullstack-starter/
├── src/
│ ├── index.ts # CLI entry: interactive selection of frontend / backend / project name
│ └── generator.ts # Generator: copy templates + generate config and script files
├── templates/
│ ├── base/ # Shared files (.gitignore)
│ ├── frontend-react/ # React frontend template
│ ├── frontend-vue/ # Vue frontend template
│ ├── backend-python/ # FastAPI backend template
│ └── backend-java/ # Spring Boot backend template
├── package.json
└── tsconfig.json

The files under templates/ are exactly what users end up with; the generator only copies templates and dynamically generates dev.sh, build.sh, Dockerfile, docker-compose.yml, .dockerignore, nginx.conf, and each project’s README.

my-project/
├── frontend/ # Frontend project
├── backend/ # Backend project
├── dev.sh # Development script: start / stop / restart / install
├── build.sh # Build script: frontend build + backend check
├── Dockerfile # Single image: frontend build + backend + Nginx
├── docker-compose.yml # Docker orchestration
├── .dockerignore # Docker build exclusions
├── nginx.conf # Nginx config: static files + /api reverse proxy
└── README.md # Project documentation
  • Directorysrc
    • Directoryapi
      • client.ts fetch wrapper, auto logout on 401
      • auth.ts user.ts role.ts permission.ts menu.ts
      • system.ts dashboard.ts ai-model.ts audit-log.ts data-management.ts
    • Directorytypes
      • common.ts auth.ts user.ts role.ts permission.ts menu.ts
      • system.ts dashboard.ts ai-model.ts audit-log.ts
    • Directorycomponents
      • admin-layout.tsx app-sidebar.tsx header.tsx login-form.tsx
      • protected-route.tsx theme-provider.tsx theme-toggle.tsx
      • shared pagination / delete confirmation / table state / loading button
      • ui 24 shadcn/ui components
    • Directorylib
      • auth-context.tsx site-config.tsx toast.ts utils.ts
    • Directorypages
      • auth login.tsx register.tsx
      • dashboard index.tsx
      • Directorysettings
        • user role permission menu system ai-model audit-log data-management profile
      • not-found.tsx
    • router.tsx
    • App.tsx
    • main.tsx
  • components.json shadcn config
  • vite.config.ts dev proxy /api → localhost:8088
  • package.json
  • Directoryapp
    • main.py FastAPI app, CORS, audit middleware, route registration
    • Directorycore
      • config.py database.py security.py deps.py
      • audit.py permissions_catalog.py menu_catalog.py
      • app_state.py seed.py schemas.py
    • auth user role permission menu
    • system ai_model audit data_management dashboard public
    • each domain contains models / schemas / crud / router
  • pyproject.toml
  • .env.example

Domain-modular organization: one package per business domain, with infrastructure kept together under core/.

File Purpose
dev.sh Development script; installs dependencies and starts frontend and backend together
build.sh Frontend build + backend code check
Dockerfile Multi-stage build producing a single image with Nginx and the backend
nginx.conf Listens on 5173, serves frontend static files, and proxies /api/ to the backend
frontend/vite.config.ts Proxies /api to localhost:8088 during development

For more detail, see Frontend Structure, Python Backend, and Java Backend.