A full-featured blog application built with React, TypeScript, and Convex. Features real-time updates, markdown support, and a modern dark/light theme.
- Markdown-enabled posts with full GitHub Flavored Markdown support
- Live preview editor with side-by-side editing and preview
- Drag & drop image uploads with automatic markdown insertion
- Copy/paste image support for seamless content creation
- Syntax highlighting for code blocks with language detection
- Tag-based organization with automatic tag aggregation
- React Router for navigating directly to posts
- Full-text search across all post content
- Tag filtering with post counts
- Real-time updates using Convex's reactive queries
- Responsive design optimized for all device sizes
- Real-time commenting system with threaded discussions
- User authentication with secure session management
- Admin controls for content management
- Dark/light theme toggle with system preference detection
- Convex Auth integration for secure authentication
- Cloudflare Turnstile CAPTCHA for bot protection during signup
- Role-based access control (admin/user permissions)
- Secure image uploads with file validation
- React 19 - Modern React with concurrent features
- TypeScript - Type-safe development
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first styling
- React Markdown - Markdown rendering with plugins
- Convex - Serverless backend with real-time updates
- Convex Auth - Authentication and session management
- File Storage - Integrated file/image storage
- react-markdown - Markdown parsing and rendering
- remark-gfm - GitHub Flavored Markdown support
- rehype-highlight - Code syntax highlighting
- @marsidev/react-turnstile - Cloudflare Turnstile integration
- sonner - Beautiful toast notifications
- Node.js 18+
- npm or yarn
- A Convex account (sign up here)
- A Cloudflare account for Turnstile CAPTCHA
Create a .env.local file in the root directory with the following variables:
# Convex Configuration
CONVEX_DEPLOY_KEY=your-convex-deploy-key
# Cloudflare Turnstile (required for user registration)
VITE_TURNSTILE_SITE_KEY=your-turnstile-site-key- Sign up at convex.dev
- Create a new project
- Get your deploy key from the Convex dashboard
- Run
npx convex devto get your deployment URL
- Sign up at Cloudflare
- Go to Turnstile in your dashboard
- Create a new site key
- Copy both the site key and secret key
-
Clone the repository
git clone <your-repo-url> cd ashtacore.com
-
Install dependencies
npm install
-
Set up Convex
npx convex dev
This will:
- Create your Convex deployment
- Set up the database schema
- Start the development backend
-
Start the development server
npm run dev
The application will be available at http://localhost:5173
src/
βββ components/ # React components
β βββ AboutPage.tsx # About page content
β βββ BlogLayout.tsx # Main layout wrapper
β βββ CommentSection.tsx # Real-time comments
β βββ CreatePostForm.tsx # Post creation with live preview
β βββ DarkModeToggle.tsx # Theme switcher
β βββ MarkdownContent.tsx # Markdown renderer
β βββ PostCard.tsx # Post preview cards
β βββ PostView.tsx # Post view page
β βββ Sidebar.tsx # Search and filtering
β βββ SignInModal.tsx # Authentication modal
β βββ SignUpForm.tsx # Registration with Turnstile
βββ hooks/
β βββ useDarkMode.ts # Dark mode state management
βββ lib/
βββ utils.ts # Utility functions
convex/
βββ auth.config.ts # Authentication configuration
βββ auth.ts # Auth helper functions
βββ comments.ts # Comment queries and mutations
βββ posts.ts # Post management with search
βββ schema.ts # Database schema definition
βββ users.ts # User management
To create posts, you need admin privileges:
- Sign up for an account through the application
- In your Convex dashboard, find the
userProfilestable - Create a profile entry for your user with
role: "admin"
- Styling: Modify
src/index.cssand Tailwind classes - Branding: Update the sidebar content in
src/components/Sidebar.tsx - Authentication: Configure providers in
convex/auth.config.ts
- Sign in with an admin account
- Navigate to the create post page
- Write your content using markdown
- Use the live preview to see how it will look
- Add tags for organization
- Drag/drop or paste images directly into the editor
- Posts are automatically published when created
- Tags are generated automatically from all posts
- Search indexes content in real-time
- Comments appear instantly across all clients
-
Deploy your backend
npx convex deploy --prod
-
Update environment variables for production
VITE_CONVEX_URL=https://your-prod-deployment.convex.cloud
-
Build and deploy frontend to your preferred platform:
npm run build
- Vercel: Zero-config deployment
- Netlify: Static site hosting
- Cloudflare Agents: Edge deployment
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
Built with β€οΈ using modern web technologies