1.9 KiB
1.9 KiB
Placebo.mk - Project Structure
Monorepo Structure
placeboMk/
├── backend/ # NestJS API server
│ ├── src/
│ │ ├── modules/ # Feature modules
│ │ ├── main.ts # Application entry point
│ │ └── app.module.ts # Root module
│ ├── .env.example
│ └── package.json
├── frontend/ # TanStack React application
│ ├── src/
│ │ ├── routes/ # TanStack Router routes
│ │ ├── components/ # React components
│ │ ├── queries/ # TanStack Query hooks
│ │ ├── lib/ # Utilities and API client
│ │ ├── types/ # TypeScript types
│ │ └── main.tsx # Application entry point
│ ├── .env.example
│ └── package.json
├── cms/ # Strapi CMS (to be initialized)
└── AGENTS.md # Agent guidelines
Getting Started
Backend (NestJS)
cd backend
npm install
cp .env.example .env
npm run start:dev
Frontend (TanStack)
cd frontend
npm install
cp .env.example .env
npm run dev
CMS (Strapi)
To be initialized with npm create strapi-app@latest cms
API Endpoints
GET /api/v1/articles- List articles with filtersGET /api/v1/articles/:id- Get article by IDGET /api/v1/articles/slug/:slug- Get article by slugPOST /api/v1/articles- Create articlePUT /api/v1/articles/:id- Update articleDELETE /api/v1/articles/:id- Delete article
Database
SQLite database with entities:
- Articles (title, content, status, tags, etc.)
- Authors (name, bio, avatar, etc.)
- Categories (name, description, parent-child relations)
Tech Stack
- Frontend: TanStack (React, Query, Router) + Vite
- Backend: NestJS + TypeORM + SQLite
- CMS: Strapi
- Language: TypeScript