Skip to content

WriterFlow - A clean, minimalist article reader and blog platform inspired by Medium. Built with FastAPI and Jinja2 templates.

Notifications You must be signed in to change notification settings

hallucinaut/writerflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WriterFlow

A clean, minimalist article reader and blog platform inspired by Medium. Built with FastAPI and Jinja2 templates.

Features

  • Markdown Blog Posts - Write and display posts with Markdown syntax
  • Article Reading - Clean reading experience with formatted content
  • Authors - Author profiles and article listings
  • Categories - Organize posts by topic
  • Search - Search across all posts
  • Pagination - Navigate through articles
  • Read Time Estimation - Calculate reading duration
  • Admin Dashboard - Manage posts and authors
  • View Counting - Track article views

Tech Stack

  • FastAPI - Python web framework
  • Jinja2 - HTML templating
  • Markdown - Markdown to HTML conversion
  • Pydantic - Data validation
  • SQLite - Lightweight database
  • bleach - HTML sanitization

Installation

1. Install Dependencies

pip install -r requirements.txt

2. Set Environment Variables

Copy the example environment file:

cp .env.example .env

Edit .env with your settings:

DATABASE_URL=sqlite:///./writerflow.db
BASE_URL=http://localhost:8000
SECRET_KEY=your-secret-key-here

3. Run the Server

python main.py

Or with uvicorn:

uvicorn main:app --reload

The platform will be available at http://localhost:8000

Usage

Browse Articles

  • Homepage shows latest published articles
  • Filter by category or author
  • Search for specific topics

Read an Article

  1. Click on any article title
  2. Clean reading interface with formatted content
  3. See author info and article metadata

Admin Dashboard

  • View all posts (published and drafts)
  • Edit post details
  • Delete posts
  • View statistics

Create a Post

  1. Navigate to /admin
  2. Post a new article (form submission)
  3. Draft posts can be published later

API Endpoints

Public

  • GET / - Home page
  • GET /post/{slug} - Article detail
  • GET /category/{slug} - Category listing
  • GET /author/{slug} - Author listing
  • GET /api/posts - List posts API
  • GET /api/posts/{slug} - Get post API
  • GET /api/categories - List categories API
  • GET /api/authors - List authors API
  • GET /api/search - Search posts API

Admin

  • GET /admin - Admin dashboard
  • POST /admin/posts - Create post
  • POST /admin/posts/{id}/delete - Delete post

Documentation

  • Interactive Swagger Docs: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Markdown Support

Write posts using Markdown syntax:

# Heading 1

## Heading 2

**Bold text** and *italic text*

- List item 1
- List item 2

[Link text](https://example.com)

Project Structure

writerflow/
├── main.py          # Main application
├── requirements.txt # Python dependencies
├── .env.example     # Environment variables template
├── .gitignore
└── README.md        # This file

Design Philosophy

  • Minimalist - Clean, distraction-free reading
  • Content-focused - Typography and readability
  • Simple - Easy to understand and use
  • Fast - Built with FastAPI for performance

License

MIT

About

WriterFlow - A clean, minimalist article reader and blog platform inspired by Medium. Built with FastAPI and Jinja2 templates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages