71 lines
1.9 KiB
Markdown
71 lines
1.9 KiB
Markdown
# 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)
|
|
```bash
|
|
cd backend
|
|
npm install
|
|
cp .env.example .env
|
|
npm run start:dev
|
|
```
|
|
|
|
### Frontend (TanStack)
|
|
```bash
|
|
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 filters
|
|
- `GET /api/v1/articles/:id` - Get article by ID
|
|
- `GET /api/v1/articles/slug/:slug` - Get article by slug
|
|
- `POST /api/v1/articles` - Create article
|
|
- `PUT /api/v1/articles/:id` - Update article
|
|
- `DELETE /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
|