A high-performance personal blog platform built with Astro. Designed for creators who value minimalist aesthetics, effortless writing, and genuine reader engagement.
Clone it. Configure it. Deploy it. Your blog is live.
- Overview
- Features
- Tech Stack
- Project Structure
- Getting Started
- Configuration
- Deployment
- Customization
- License
Shiori (栞) means "bookmark" in Japanese — a small thing that holds your place in a larger story. This project is built as a ready-to-use blog template with a full authentication system, a rich text editor, threaded comments, and an admin dashboard out of the box.
It is optimized for Vercel with Turso (LibSQL) as the remote database, but can be adapted for other providers.
- Threaded Conversations — Nested comment system with reply support, keeping discussions organized and easy to follow.
- Dynamic Search — Powerful internal search that scans titles, excerpts, and full content to help readers find specific topics.
- Instant Feedback — Real-time toast notifications for every interaction (posting, replying, errors).
- One-Click Login — Sign in with Google OAuth or register with email/password. No unnecessary friction.
- Responsive Design — Fully optimized for mobile, tablet, and desktop with a dark glassmorphism aesthetic.
- Rich Text Editor — A built-in Tiptap editor with formatting, image uploads, links, and color support.
- Admin Dashboard — Create, edit, and manage posts from a dedicated admin panel.
- Comment Moderation — Admins can delete any comment; users can delete their own.
- Image Management — Cloudinary integration for fast, optimized image hosting and delivery.
- Server-Side Rendering — Astro hybrid mode with selective client-side hydration for interactive components.
- Dynamic Sitemap — A custom database-driven
sitemap.xmlthat ensures Google discovers every new post automatically. - Advanced SEO — Comprehensive structured data (JSON-LD) for
BlogPostingandBreadcrumbListto enhance search engine results. - Image Optimization — Automatic Cloudinary transformations for responsive, optimized images.
- Type Safety — Full TypeScript coverage across API routes, components, and database queries.
- Analytics Ready — Integrated Google Analytics 4 (GA4) setup.
| Layer | Technology |
|---|---|
| Framework | Astro 5 |
| Database | Astro DB (LibSQL / Turso) |
| Authentication | Auth-Astro (Auth.js) + bcryptjs |
| UI Components | React 19 |
| Styling | Tailwind CSS 4 |
| Animations | Framer Motion |
| Editor | Tiptap (Headless Rich Text) |
| Image Hosting | Cloudinary |
| Notifications | React Hot Toast |
| Testing | Vitest |
| Deployment | Vercel |
src/
├── components/ # React and Astro components
│ ├── ui/ # Reusable UI primitives (Dropdown, etc.)
│ ├── Comments.tsx # Threaded comment system
│ ├── BlogFeed.tsx # Filterable post feed with pagination
│ └── ...
├── layouts/
│ └── Layout.astro # Base layout (header, footer, meta, styles)
├── lib/ # Shared utilities (image optimization, etc.)
├── pages/
│ ├── admin/ # Admin dashboard (new, edit, index)
│ ├── api/ # API routes (comments, posts, auth)
│ ├── blog/ # Blog listing and individual post pages
│ ├── index.astro # Homepage
│ ├── profile.astro # User profile page
│ ├── login.astro # Login page
│ ├── signup.astro # Registration page
│ ├── about.astro # About the author
│ ├── privacy.astro # Privacy policy
│ └── terms.astro # Terms of service
├── tests/ # Test files
└── types.ts # Shared TypeScript interfaces
db/
├── config.ts # Database schema definition
└── seed.ts # Seed data
- Node.js 18+ or Bun
- A Google Cloud project (for OAuth)
- A Cloudinary account (for image uploads)
- A Turso database (for production deployment)
git clone https://github.com/snui1s/Shiori-Blog.git
cd web-blog
bun installCreate a .env file in the project root:
# Admin
ADMIN_EMAIL=your_email@gmail.com
# Database (optional for local development)
# ASTRO_DB_REMOTE_URL=libsql://your-db.turso.io
# ASTRO_DB_APP_TOKEN=your_turso_token
# Cloudinary
PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name
PUBLIC_CLOUDINARY_UPLOAD_PRESET=your_unsigned_preset
# Authentication
AUTH_SECRET=your_random_32_char_string
AUTH_TRUST_HOST=true
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secretbun run devThe site will be available at http://localhost:4321.
bun test- Go to Google Cloud Console.
- Create a new project or select an existing one.
- Navigate to APIs & Services > OAuth consent screen.
- Set User Type to External and complete the required fields.
- Go to Credentials > Create Credentials > OAuth client ID.
- Select Web application as the application type.
- Add Authorized JavaScript origins:
http://localhost:4321https://your-domain.vercel.app
- Add Authorized redirect URIs:
http://localhost:4321/api/auth/callback/googlehttps://your-domain.vercel.app/api/auth/callback/google
- Copy the Client ID and Client Secret into your
.envfile.
- Sign up at Cloudinary.
- Copy your Cloud Name from the dashboard.
- Go to Settings > Upload > Upload presets.
- Create a new preset with Signing Mode set to Unsigned.
- Copy the Cloud Name and Preset name into your
.envfile.
- Create a database at Turso.
- Retrieve your Database URL and Auth Token.
- Add both to your
.envfile. - Push the schema to the remote database:
bun astro db push --remote
This project is configured for deployment on Vercel.
-
Push your repository to GitHub.
-
Import the project into Vercel.
-
Add the following environment variables in the Vercel dashboard:
Variable Description ADMIN_EMAILAdministrator email address AUTH_SECRETRandom string for session encryption AUTH_TRUST_HOSTSet to trueGOOGLE_CLIENT_IDFrom Google Cloud Console GOOGLE_CLIENT_SECRETFrom Google Cloud Console ASTRO_DB_REMOTE_URLTurso database URL ASTRO_DB_APP_TOKENTurso authentication token PUBLIC_CLOUDINARY_CLOUD_NAMECloudinary cloud name PUBLIC_CLOUDINARY_UPLOAD_PRESETCloudinary unsigned upload preset -
Deploy. Vercel will automatically detect Astro and handle the build.
To generate an
AUTH_SECRET, run:openssl rand -base64 32
Shiori is designed to be forked and personalized:
| What to Change | Where |
|---|---|
| Blog name | src/layouts/Layout.astro, src/pages/index.astro |
| About page | src/pages/about.astro |
| Homepage content | src/pages/index.astro |
| Theme colors | CSS variables in src/layouts/Layout.astro — change --color-primary |
| Privacy / Terms | src/pages/privacy.astro, src/pages/terms.astro |
This project is open source and available for personal and commercial use. Feel free to clone, modify, and make it your own.
Hello! I hope you like this project. If you are looking to start your own blog, please feel free to clone this repository and customize it into your own version. I would be more than happy to help you create your very own Time Capsule to document your life's journey.
Built by snui1s