feat(backend): initial setup for cms backend service
This commit is contained in:
55
backend/README.md
Normal file
55
backend/README.md
Normal file
@ -0,0 +1,55 @@
|
||||
# Gallus Pub CMS Backend
|
||||
|
||||
Headless CMS backend for managing Gallus Pub website content with Gitea OAuth authentication.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Create `.env` file from `.env.example`:
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
3. Update environment variables in `.env`:
|
||||
- Set Gitea OAuth credentials
|
||||
- Set Git repository URL and token
|
||||
- JWT secrets are already generated
|
||||
|
||||
4. Create data directory and run migrations:
|
||||
```bash
|
||||
mkdir -p data
|
||||
```
|
||||
|
||||
5. Generate and run migrations:
|
||||
```bash
|
||||
npm run db:generate
|
||||
npm run db:migrate
|
||||
```
|
||||
|
||||
6. Start development server:
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Server will run at http://localhost:3000
|
||||
|
||||
## Available Scripts
|
||||
|
||||
- `npm run dev` - Start development server with watch mode
|
||||
- `npm run build` - Build for production
|
||||
- `npm run start` - Start production server
|
||||
- `npm run db:generate` - Generate database migrations
|
||||
- `npm run db:migrate` - Run database migrations
|
||||
- `npm run db:studio` - Open Drizzle Studio
|
||||
|
||||
## Documentation
|
||||
|
||||
See parent directory for complete documentation:
|
||||
- `CMS_CONCEPT.md` - System architecture
|
||||
- `CMS_GITEA_AUTH.md` - Authentication details
|
||||
- `CMS_IMPLEMENTATION_EXAMPLE.md` - Code examples
|
||||
- `CMS_SETUP_GUIDE.md` - Deployment guide
|
||||
Reference in New Issue
Block a user