feat: add admin API routes for tags, timeline events, uploads, and uses management
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled

- Implemented GET and POST endpoints for managing tags in `src/app/api/admin/tags/route.ts`.
- Created PUT and DELETE endpoints for timeline events in `src/app/api/admin/timeline/[id]/route.ts`.
- Added GET and POST endpoints for timeline management in `src/app/api/admin/timeline/route.ts`.
- Developed file upload functionality with validation in `src/app/api/admin/upload/route.ts`.
- Introduced PUT and DELETE endpoints for managing uses items in `src/app/api/admin/uses/[id]/route.ts`.
- Added GET and POST endpoints for uses management in `src/app/api/admin/uses/route.ts`.

feat: enhance admin UI components for better user experience

- Created `AdminSidebar` component for navigation in `src/components/admin/AdminSidebar.tsx`.
- Developed `ImageUpload` component for handling image uploads in `src/components/admin/ImageUpload.tsx`.
- Implemented `RichTextEditor` component for rich text editing in `src/components/admin/RichTextEditor.tsx`.
- Added `TagsInput` component for managing tags in `src/components/admin/TagsInput.tsx`.
- Created `TiptapRenderer` component for rendering HTML content in `src/components/writing/TiptapRenderer.tsx`.

feat: establish database interaction layer with Prisma

- Added database connection and session management in `src/lib/db.ts` and `src/lib/auth.ts`.
- Implemented CRUD operations for posts, products, projects, settings, timeline events, and uses items in respective files under `src/lib/db/`.
- Introduced utility functions for formatting dates and slug generation in `src/lib/types.ts`.
This commit is contained in:
Ali Taghavi
2026-05-03 14:07:58 +03:30
parent f08d3b1fde
commit 29b70c6865
93 changed files with 4561 additions and 1080 deletions

View File

@@ -1,41 +1,48 @@
version: "3.9"
services:
db:
image: docker.arvancloud.ir/library/mariadb:11
container_name: biztaghavi_db
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MARIADB_DATABASE: ${DB_NAME:-biztaghavi}
MARIADB_USER: ${DB_USER:-biztaghavi}
MARIADB_PASSWORD: ${DB_PASSWORD}
volumes:
- db-data:/var/lib/mysql
networks:
- app-network
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 20
next-app:
build:
context: .
dockerfile: Dockerfile
container_name: biztaghavi_app
restart: unless-stopped
depends_on:
db:
condition: service_healthy
env_file: .env
environment:
NODE_ENV: production
NEXT_PUBLIC_SANITY_PROJECT_ID: ${SANITY_PROJECT_ID}
NEXT_PUBLIC_SANITY_DATASET: ${SANITY_DATASET:-production}
SANITY_API_TOKEN: ${SANITY_API_TOKEN}
RESEND_API_KEY: ${RESEND_API_KEY}
NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${UMAMI_WEBSITE_ID}
NEXT_PUBLIC_UMAMI_URL: ${UMAMI_URL}
expose:
- "3000"
networks:
- app-network
nginx:
image: nginx:alpine
restart: unless-stopped
DATABASE_URL: mysql://${DB_USER:-biztaghavi}:${DB_PASSWORD}@db:3306/${DB_NAME:-biztaghavi}
ports:
- "80:80"
- "443:443"
- "127.0.0.1:3009:3000"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
- certbot-webroot:/var/www/certbot
depends_on:
- next-app
- uploads:/app/public/uploads
networks:
- app-network
volumes:
certbot-webroot:
db-data:
uploads:
networks:
app-network: