https://github.com/harshit-3905/binary-blogs
Binary Blogs combines the timeless elegance of a quill with the cutting-edge world of technology. This blog is a fusion of creativity and innovation, exploring the intersection of code and narrative. Join the journey of tech insights, coding adventures, and digital stories that unfold at the crossroads of Quill and Tech.
https://github.com/harshit-3905/binary-blogs
appwrite aws-cloudfront aws-s3 ci-cd react react-router-dom redux-toolkit
Last synced: about 1 month ago
JSON representation
Binary Blogs combines the timeless elegance of a quill with the cutting-edge world of technology. This blog is a fusion of creativity and innovation, exploring the intersection of code and narrative. Join the journey of tech insights, coding adventures, and digital stories that unfold at the crossroads of Quill and Tech.
- Host: GitHub
- URL: https://github.com/harshit-3905/binary-blogs
- Owner: Harshit-3905
- Created: 2024-01-01T06:15:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-26T07:38:26.000Z (over 1 year ago)
- Last Synced: 2024-12-30T19:48:16.322Z (over 1 year ago)
- Topics: appwrite, aws-cloudfront, aws-s3, ci-cd, react, react-router-dom, redux-toolkit
- Language: JavaScript
- Homepage: https://binary-blogs.harshit-joshi.tech/
- Size: 3.72 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Binary Blogs
A modern React + TypeScript blogging platform powered by Appwrite.
## Features
- Email/password auth + guest login
- Blog listing/detail/create/edit flows
- Likes, bookmarks, and comments
- User preferences and dashboard analytics
- Markdown rendering with Prism syntax highlighting
- Route-level code splitting with protected/guest-only routes
## Tech stack
- React 18 + TypeScript
- Vite
- Zustand (state management)
- React Router
- Tailwind CSS + shadcn/ui + Radix UI
- Appwrite (auth, database, storage)
## Project structure
- `src/services/real/*`: Appwrite-backed services (single source of truth)
- `src/services/index.ts`: service barrel exports
- `src/lib/appwrite.ts`: Appwrite client instances
- `src/lib/appwriteConfig.ts`: Appwrite IDs and constants
- `src/store/*`: Zustand stores
- `src/pages/*`: route pages
## Prerequisites
- Node.js 20+
- npm
- Appwrite project with database/collections/bucket already provisioned
## Environment variables
Copy `.env.example` to `.env` and set:
```env
VITE_APPWRITE_PROJECT_ID=your_project_id
VITE_APPWRITE_ENDPOINT=https://your-appwrite-endpoint/v1
VITE_APPWRITE_DATABASE_ID=your_database_id
```
Collection and bucket IDs are constants in `src/lib/appwriteConfig.ts`:
- Collections: `users`, `blogs`, `comments`, `likes`, `bookmarks`, `preferences`, `tags`
- Bucket: `blog_images`
## Install and run
```bash
npm install
npm run dev
```
## Build and preview
```bash
npm run build
npm run preview
```
## Lint
```bash
npm run lint
```
## Guest login
Guest login uses a fixed account configured in `src/services/real/authService.ts`.
If you want different guest credentials, update the guest constants there.
## Deployment
GitHub Actions workflow: `.github/workflows/deploy-to-aws.yml`
Build step expects these GitHub secrets:
- `VITE_APPWRITE_ENDPOINT`
- `VITE_APPWRITE_PROJECT_ID`
- `VITE_APPWRITE_DATABASE_ID`
AWS deploy/invalidation secrets are also required by the workflow.