A modern full-stack blogging platform built with React, Hono, and Cloudflare Workers.
Pencraft is a high-performance blogging platform optimized for edge computing using Cloudflare Workers. It provides a seamless experience for creating and sharing medical-related content with TypeScript support throughout the stack.
- 👤 Secure authentication system
- ✍️ Markdown-based blog editor
- 🚀 Edge-computing powered backend
- 📱 Responsive design
- 🎨 Modern UI with TailwindCSS
- 🔒 TypeScript support
- 📝 Rich Markdown editor integration
- ⚡ Fast page loads with Vite
- Cloudflare Workers
- Hono (Backend Framework)
- Prisma with Accelerate
- JWT Authentication
- bcryptjs for password hashing
- React 18
- TypeScript
- Vite
- TailwindCSS
- React Router DOM
- React MD Editor
- Axios for API calls
- Lucide React for icons
- Navigate to the backend directory
cd backend- Install dependencies
npm install- Setup DB (
PostgreSQL+Prisma Accelerate)
- Get your connection url from neon.db or aieven.tech
postgres://neondb:password@host/db- Get connection pool URL from Prisma accelerate
prisma://accelerate.prisma-data.net/?api_key=...- Replace
DATABASE_URLin.envwith your neon DB connection URL
DATABASE_URL="postgres://avnadmin:password@host/db"- Add
DATABASE_URLas the connection pool url inwrangler.toml
name = "backend"
compatibility_date = "2023-12-01"
[vars]
DATABASE_URL = "prisma://accelerate.prisma-data.net/?api_key=..."- Start the development server
npm run dev- Navigate to the frontend directory
cd frontend- Install dependencies
npm install- Start development server
npm run devThe frontend will be available at http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
npm run dev- Start development server with Wranglernpm run deploy- Deploy to Cloudflare Workers
Create .env file in backend directory same as .env.example and add your environment variables.
Create config.ts file in frontend directory same as example.config.ts and add your environment variables.
This project is licensed under the MIT License.