Skip to content

sparrowsl/microblog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microblog

This project is a modern reimplementation of the famous Flask Mega-Tutorial by Miguel Grinberg, rebuilt from the ground up using a modern full-stack JavaScript ecosystem:


🧱 Project Goals

This project aims to:

  • Explore how the concepts in the Flask Mega-Tutorial map to a modern frontend/backend-separated architecture.
  • Use best practices with SvelteKit for building reactive, modern UIs.
  • Leverage Hono for blazing-fast API handling and middleware.
  • Integrate TailwindCSS for utility-first styling.
  • Persist and query data efficiently with SQLite.
  • Learn modern full-stack development by rebuilding a classic tutorial.

🗂️ Project Structure

/
│── web/        # SvelteKit frontend app
│── api/        # Hono API backend
└── README.md   # You're here

🔧 .env Configuration

Both the frontend (SvelteKit) and backend (Hono) projects use environment variables to store sensitive or environment-specific configuration. You'll need to create .env files in each app directory.

Create a .env file inside the api/ folder or copy the examples in .env.example:

PORT=3000
DATABASE_URL=./microblog.db
JWT_SECRET_KEY=your-super-secret-key
CORS_ORIGIN=http://localhost:5173

Create a .env file inside the web/ folder:

VITE_API_BASE_URL=http://localhost:5000

Getting started

  1. Clone the repo
git clone https://github.com/artisansco/microblog.git
cd microblog
  1. Install deps You'll need Node.js (18+).
npm install # installs all deps in both folders
  1. Initialize/seed db
cd api

# Run migration or init script
npm run db:seed
  1. Run/start dev servers
# In one terminal
cd api
npm run dev

# In another terminal
cd web
npm run dev

The frontend is at http://localhost:5173 and the backend at http://localhost:5000.

About

The blog application modeled after the Flask Mega Tutorial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 73.7%
  • Svelte 14.3%
  • HTML 5.3%
  • JavaScript 5.1%
  • CSS 1.6%