Skip to content
Projects

About

一个现代化的全栈博客系统,集成了文章管理、评论互动、友链交换、动态发布、数据统计等完整功能。

Web & App Development

How these counts are measured

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README-en.md

Original
FlecBlog Logo

FlecBlog

A modern full-stack blogging system with taste, clarity, and a strong sense of identity.

Instead of piling on noisy features, FlecBlog focuses on doing the essentials well: content, management, and presentation, all polished into one cohesive experience.

Live Demo / Documentation / Report an Issue / Community

简体中文 / English

Monorepo Go Vue 3 Nuxt 4

FlecBlog Preview

Overview

FlecBlog is a three-part blogging system built around a complete content workflow.

By separating the public blog, the admin console, and the backend service into clearly defined layers, it stays expressive on the surface while remaining maintainable under the hood.

Module Stack Purpose
server Go 1.27.1 / Gin / GORM / PostgreSQL Backend services, authentication, APIs, data management, and scheduled jobs
admin Vue 3 / Element Plus / Vite Content management, dashboards, the editor, and admin operations
blog Nuxt 4.7.1 / Vue 3.5 / SCSS Public-facing blog, SSR, SEO, and reading experience

Why FlecBlog

  • Built as a complete engineering project, not just a polished demo page
  • Clean separation between the admin panel and the public blog
  • Covers the essentials you expect from a modern blog system: posts, comments, links, and analytics
  • A strong fit for personal brands, content-driven websites, and long-term product expansion

Preview

Home Page Article Page
Blog Home Blog Article
Admin Dashboard Editor
Admin Dashboard Admin Editor

Tech Stack

Server

  • Language: Go 1.27.1
  • Framework: Gin
  • ORM: GORM
  • Database: PostgreSQL
  • Authentication: JWT, OAuth2, Goth
  • API Docs: Swagger
  • Scheduled Jobs: Cron
  • Other Integrations: User-Agent parsing, multi-channel notifications, WeChat QR login

Admin

  • Framework: Vue 3 + Vite
  • UI Library: Element Plus
  • State Utilities: VueUse
  • Markdown Editor: CodeMirror 6
  • Charts: ECharts, echarts-wordcloud
  • Other: TypeScript, Vue Router, Axios, dayjs, SCSS

Blog

  • Framework: Nuxt 4 - a full-stack framework built on Vue
  • Article Rendering: markdown-it, Highlight.js, Mermaid
  • Styling: SCSS
  • SEO: @nuxtjs/seo, sitemap, Atom feed
  • PWA: @vite-pwa/nuxt
  • Other: TypeScript, VueUse, dayjs, Lenis, medium-zoom, APlayer

Deployment

Docker Compose Setup

Suitable for users who need custom configurations or already have a Docker environment.

  1. Create a .env file:
# Database Configuration
DB_PASSWORD=your_database_password

# JWT Configuration
JWT_SECRET=your_jwt_secret_key

# Site Configuration
API_URL=https://api.yourdomain.com/api/v1
  1. Create a docker-compose.yml file:
services:
  server:
    image: talen8/flec-server:latest
    container_name: flec_server
    restart: unless-stopped
    environment:
      DB_HOST: localhost
      DB_PORT: 5432
      DB_NAME: postgres
      DB_USER: postgres
      DB_PASSWORD: ${DB_PASSWORD}
      JWT_SECRET: ${JWT_SECRET}
      API_URL: ${API_URL}
    ports:
      - "8080:8080"
    volumes:
      - /srv/flecblog:/app/data
    networks:
      - flec-network

  blog:
    image: talen8/flec-blog:latest
    container_name: flec_blog
    restart: unless-stopped
    environment:
      NUXT_PUBLIC_API_URL: ${API_URL}
    ports:
      - "3000:3000"
    networks:
      - flec-network
    depends_on:
      - server

  admin:
    image: talen8/flec-admin:latest
    container_name: flec_admin
    restart: unless-stopped
    environment:
      API_URL: ${API_URL}
    ports:
      - "4000:4000"
    networks:
      - flec-network
    depends_on:
      - server

networks:
  flec-network:
    driver: bridge
Full configuration with PostgreSQL included
services:
  postgres:
    image: postgres:15-alpine
    container_name: flec_postgres
    restart: unless-stopped
    environment:
      POSTGRES_DB: postgres
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - flec-network
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5

  server:
    image: talen8/flec-server:latest
    container_name: flec_server
    restart: unless-stopped
    environment:
      DB_HOST: postgres
      DB_PORT: 5432
      DB_NAME: postgres
      DB_USER: postgres
      DB_PASSWORD: ${DB_PASSWORD}
      JWT_SECRET: ${JWT_SECRET}
      API_URL: ${API_URL}
    ports:
      - "8080:8080"
    volumes:
      - /srv/flecblog:/app/data
    networks:
      - flec-network
    depends_on:
      postgres:
        condition: service_healthy

  blog:
    image: talen8/flec-blog:latest
    container_name: flec_blog
    restart: unless-stopped
    environment:
      NUXT_PUBLIC_API_URL: ${API_URL}
    ports:
      - "3000:3000"
    networks:
      - flec-network
    depends_on:
      - server

  admin:
    image: talen8/flec-admin:latest
    container_name: flec_admin
    restart: unless-stopped
    environment:
      API_URL: ${API_URL}
    ports:
      - "4000:4000"
    networks:
      - flec-network
    depends_on:
      - server

networks:
  flec-network:
    driver: bridge

volumes:
  postgres_data:
  1. Start the services:
docker-compose up -d

Access URLs

Service URL
Blog http://localhost:3000
Admin http://localhost:4000
API Docs http://localhost:8080/swagger/index.html

Run from Source

Requirements

  • Node.js 24+ (admin, blog)
  • Go 1.27.1 (server)
  • PostgreSQL 12+ (server)

Database Setup

Install and configure PostgreSQL first, then create the database and user you want to use.

On first startup, the application will automatically run pkg/database/sql/init_database.sql to initialize the database, including table creation and seed data.

⚠️ PostgreSQL 15+ schema permissions: If you're using PostgreSQL 15 or later and the database user is not postgres (the superuser), you'll need to grant schema permissions manually.

sudo -i -u postgres
psql -U postgres -d <database_name> -c "GRANT CREATE ON SCHEMA public TO <username>;"

PostgreSQL 15+ restricts CREATE privileges on the public schema by default, so this step grants the permissions required by the app.

Server

cd server
go mod download
cp .env.example .env
# Edit .env and configure your database connection
go run cmd/main.go

Admin

cd admin
npm install
cp .env.example .env
# Edit .env and set the API base URL
npm run dev

Blog

cd blog
npm install
cp .env.example .env
# Edit .env and set the API base URL
npm run dev

Configuration

Server environment variables

# JWT settings
JWT_SECRET=your_jwt_secret_key

# Server settings
SERVER_PORT=8080
SERVER_ALLOW_ORIGINS=*

# Database settings
DB_HOST=localhost
DB_PORT=5432
DB_NAME=postgres
DB_USER=postgres
DB_PASSWORD=your_database_password

Admin environment variables

VITE_API_URL=https://api.yourdomain.com/api/v1

Blog environment variables

NUXT_PUBLIC_API_URL=https://api.yourdomain.com/api/v1

Features

SSR Rendering

The blog frontend runs on Nuxt 4 with SSR enabled, which provides:

  • Better SEO, with fully rendered content available to search engines
  • Faster first-page load times
  • A smoother reading experience

SEO

FlecBlog includes a complete SEO setup:

  • Dynamic sitemap.xml
  • robots.txt
  • Atom feed support
  • Open Graph metadata
  • Structured data

API Documentation

Once the server is running, you can access the API documentation here:

http://localhost:8080/swagger/index.html

Directory Structure

Server

server/
├── api/              # API definitions
│   ├── middleware/   # Middleware (auth, CORS, logging, rate limiting, RBAC, etc.)
│   ├── router/       # Route definitions
│   └── v1/           # Versioned API v1 handlers
├── cmd/              # Application entry point
│   └── main.go
├── config/           # Configuration management
├── docs/             # Generated Swagger docs
├── internal/         # Internal business logic
│   ├── dto/          # Data transfer objects
│   ├── model/        # Data models
│   ├── repository/   # Data access layer
│   └── service/      # Business services
├── pkg/              # Reusable packages
├── templates/        # Template files
├── Dockerfile
└── go.mod

Admin

admin/
├── src/
│   ├── api/              # API clients
│   ├── assets/           # Static assets
│   ├── components/       # Shared components
│   ├── layouts/          # Page layouts
│   ├── router/           # Route configuration
│   ├── types/            # TypeScript types
│   ├── utils/            # Utility functions
│   ├── views/            # Page views
│   ├── App.vue           # Root component
│   └── main.ts           # Application entry
├── public/               # Public files
├── index.html            # HTML template
├── vite.config.ts        # Vite config
├── nginx.conf            # Nginx config
└── Dockerfile            # Docker setup

Blog

blog/
├── app/                  # Main app directory
│   ├── assets/           # Static assets
│   ├── components/       # Vue components
│   ├── composables/      # Composable utilities
│   ├── layouts/          # Layouts
│   ├── pages/            # File-based routes
│   ├── plugins/          # Nuxt plugins
│   ├── utils/            # Utility helpers
│   └── app.vue           # Root component
├── public/               # Public files
├── server/               # Server-side code
│   ├── plugins/          # Server plugins
│   └── routes/           # API routes
├── types/                # TypeScript types
├── nuxt.config.ts        # Nuxt config
└── Dockerfile            # Docker setup

Philosophy

FlecBlog is not about making things more complicated. It is about making them more complete.

Minimalism does not have to feel empty. Polish does not have to feel loud.

This project is meant to be a calm, dependable home for content: something you can write in, build on, and slowly shape into a brand of your own.

Contributing

Issues and pull requests are always welcome.

License

MIT License

Contact

If you have questions, feel free to reach out:

Explore related projects

Loading…