Skip to content

Commit 550dbbb

Browse files
committed
feat: enhance README with comprehensive project overview, key features, tech stack, and development guidelines
1 parent 2e45ace commit 550dbbb

File tree

1 file changed

+305
-21
lines changed

1 file changed

+305
-21
lines changed

README.md

Lines changed: 305 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,320 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
1+
# TechDiary
22

3-
## Getting Started
3+
A modern blogging platform designed specifically for the tech community. Built for developers, by developers.
44

5-
First, run the development server:
5+
![TechDiary](public/og.png)
6+
7+
## 🌟 Overview
8+
9+
TechDiary is a feature-rich blogging platform that empowers developers and tech enthusiasts to share knowledge, document their journey, and build meaningful connections within the tech community. With support for multiple languages, intuitive writing tools, and powerful engagement features, TechDiary creates the perfect environment for technical content creation and discovery.
10+
11+
## ✨ Key Features
12+
13+
### 📝 Content Creation
14+
- **Rich Markdown Editor** with live preview and auto-save
15+
- **Drag-and-drop Image Upload** with cropping capabilities
16+
- **Series Support** for organizing related articles
17+
- **Draft Management** with autosave every 30 seconds
18+
- **SEO Optimization** with meta tags and structured data
19+
20+
### 🌍 Multi-language Support
21+
- **Bengali and English** interface support
22+
- **Localized Content** with proper date and number formatting
23+
- **Easy Language Switching** with persistent preferences
24+
25+
### 🔍 Powerful Search
26+
- **Full-text Search** powered by MeilSearch
27+
- **Advanced Filtering** by tags, authors, and dates
28+
- **Real-time Search Suggestions** and auto-complete
29+
- **Fast Response Times** (<500ms average)
30+
31+
### 💬 Rich Engagement
32+
- **Emoji Reactions** (Love, Fire, Wow, Haha, Cry, Unicorn)
33+
- **Threaded Comments** with nested discussions
34+
- **Bookmarking System** for saving articles
35+
- **Following System** to track favorite authors
36+
37+
### 🔐 Secure Authentication
38+
- **GitHub OAuth** integration for developers
39+
- **Secure Session Management** with automatic renewal
40+
- **Profile Customization** with bio, location, education, and social links
41+
42+
### 🎨 Modern UI/UX
43+
- **Dark/Light Theme** support
44+
- **Responsive Design** for all devices
45+
- **Accessibility Compliant** (WCAG 2.1 AA)
46+
- **Progressive Web App** capabilities
47+
48+
## 🛠 Tech Stack
49+
50+
### Frontend
51+
- **[Next.js 15](https://nextjs.org/)** - React framework with App Router
52+
- **[React 19](https://react.dev/)** - UI library
53+
- **[TypeScript](https://www.typescriptlang.org/)** - Type safety
54+
- **[Tailwind CSS](https://tailwindcss.com/)** - Utility-first CSS
55+
- **[shadcn/ui](https://ui.shadcn.com/)** - Component library
56+
57+
### Backend & Database
58+
- **[SQLKit](https://github.com/sqlkit-dev/sqlkit)** - Very light sql query builder, we are using most of the sql query using this.
59+
- **[Drizzle ORM](https://orm.drizzle.team/)** - Awesome sql tool but we are only using for migration
60+
- **[PostgreSQL](https://www.postgresql.org/)** - Primary database
61+
- **[Next.js API Routes](https://nextjs.org/docs/api-routes/introduction)** - Backend API
62+
63+
### Search & Storage
64+
- **[MeilSearch](https://www.meilisearch.com/)** - Fast, typo-tolerant search
65+
- **[Cloudinary](https://cloudinary.com/)** - Image optimization and storage
66+
- **[Cloudflare R2](https://www.cloudflare.com/en-gb/developer-platform/products/r2/)** - Alternative file storage
67+
68+
### State Management
69+
- **[Jotai](https://jotai.org/)** - Atomic state management
70+
- **[TanStack Query](https://tanstack.com/query)** - Server state management
71+
- **[React Hook Form](https://react-hook-form.com/)** - Form handling
72+
- **[Zod](https://zod.dev/)** - Schema validation
73+
74+
### Development Tools
75+
- **[Bun](https://bun.sh/)** - Fast JavaScript runtime and package manager
76+
- **[ESLint](https://eslint.org/)** - Code linting
77+
- **[Prettier](https://prettier.io/)** - Code formatting
78+
79+
## 🚀 Quick Start
80+
81+
### Prerequisites
82+
- **Node.js 18+** or **Bun 1.0+**
83+
- **PostgreSQL 14+**
84+
- **MeilSearch instance**
85+
- **Cloudinary account**
86+
- **GitHub OAuth App**
87+
88+
### Environment Variables
89+
90+
Create a `.env.local` file in the root directory:
91+
92+
```env
93+
# Database
94+
DATABASE_URL="postgresql://username:password@localhost:5432/techdiary"
95+
96+
# Authentication
97+
GITHUB_CLIENT_ID="your_github_client_id"
98+
GITHUB_CLIENT_SECRET="your_github_client_secret"
99+
GITHUB_CALLBACK_URL="http://localhost:3000/api/auth/github/callback"
100+
101+
# File Storage
102+
CLOUDINARY_URL="cloudinary://api_key:api_secret@cloud_name"
103+
104+
# Search
105+
MEILISEARCH_ADMIN_API_KEY="your_meilisearch_admin_key"
106+
NEXT_PUBLIC_MEILISEARCH_API_HOST="http://localhost:7700"
107+
NEXT_PUBLIC_MEILISEARCH_SEARCH_API_KEY="your_meilisearch_search_key"
108+
```
109+
110+
### Installation & Setup
111+
112+
1. **Clone the repository**
113+
```bash
114+
git clone https://github.com/techdiary-dev/techdiary.dev.git
115+
cd techdiary.dev
116+
```
117+
118+
2. **Install dependencies**
119+
```bash
120+
bun install
121+
# or
122+
npm install
123+
```
124+
125+
3. **Set up the database**
126+
```bash
127+
# Generate database schema
128+
bun run db:generate
129+
130+
# Apply migrations
131+
bun run db:push
132+
```
133+
134+
4. **Start the development server**
135+
```bash
136+
bun run dev
137+
```
138+
139+
5. **Open your browser**
140+
Navigate to [http://localhost:3000](http://localhost:3000)
141+
142+
## 📋 Available Scripts
6143

7144
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
145+
# Development
146+
bun run dev # Start development server
147+
bun run build # Build for production
148+
bun run start # Start production server
149+
bun run lint # Run ESLint
150+
151+
# Database
152+
bun run db:generate # Generate migrations from schema changes
153+
bun run db:push # Push schema changes to database
154+
bun run db:studio # Open Drizzle Studio (database GUI)
155+
156+
# Backend
157+
bun run play # Run backend playground script
158+
```
159+
160+
## 🏗 Project Structure
161+
162+
```
163+
├── src/
164+
│ ├── app/ # Next.js App Router pages
165+
│ │ ├── (home)/ # Homepage routes
166+
│ │ ├── (dashboard-editor)/ # Protected dashboard routes
167+
│ │ ├── [username]/ # User profile pages
168+
│ │ └── api/ # API routes
169+
│ ├── backend/ # Backend logic and services
170+
│ │ ├── models/ # Domain models and types
171+
│ │ ├── persistence/ # Database schemas and repositories
172+
│ │ └── services/ # Business logic and actions
173+
│ ├── components/ # Reusable UI components
174+
│ │ ├── ui/ # shadcn/ui components
175+
│ │ ├── Editor/ # Article editor components
176+
│ │ ├── Navbar/ # Navigation components
177+
│ │ └── render-props/ # Render prop components
178+
│ ├── hooks/ # Custom React hooks
179+
│ ├── i18n/ # Internationalization
180+
│ ├── lib/ # Utility libraries
181+
│ ├── store/ # Global state management
182+
│ └── styles/ # Global styles and CSS
183+
├── docs/ # Documentation
184+
│ ├── components/ # Component documentation
185+
│ ├── hooks/ # Hooks documentation
186+
│ └── PRD.md # Product Requirements Document
187+
├── public/ # Static assets
188+
└── migrations/ # Database migrations
15189
```
16190

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
191+
## 🎯 Core Features Deep Dive
192+
193+
### Article Editor
194+
- **Markdown Support**: Full markdown syntax with extensions
195+
- **Live Preview**: Real-time preview with markdoc parser
196+
- **Auto-save**: Saves drafts automatically every 30 seconds
197+
- **Media Upload**: Drag-and-drop with image cropping
198+
- **Publishing Controls**: Draft/publish with scheduling
199+
200+
### Search System
201+
- **MeilSearch Integration**: Lightning-fast full-text search
202+
- **Typo Tolerance**: Finds results even with spelling mistakes
203+
- **Faceted Search**: Filter by tags, authors, dates
204+
- **Search Analytics**: Track popular searches and content gaps
205+
206+
### User Experience
207+
- **Responsive Design**: Mobile-first approach with desktop enhancements
208+
- **Accessibility**: WCAG 2.1 AA compliant with screen reader support
209+
- **Performance**: <3 second page loads, optimized images
210+
- **PWA Ready**: App-like experience on mobile devices
211+
212+
### Community Features
213+
- **User Profiles**: Rich profiles with bio, skills, social links
214+
- **Following System**: Follow favorite authors and topics
215+
- **Engagement Tools**: Reactions, comments, bookmarks
216+
- **Content Discovery**: Personalized recommendations
217+
218+
## 🌐 Internationalization
219+
220+
TechDiary supports multiple languages with full localization:
221+
222+
- **Interface Translation**: All UI elements translated
223+
- **Content Localization**: Date, number, and currency formatting
224+
- **RTL Support**: Right-to-left text support
225+
- **Language Detection**: Automatic language detection and switching
226+
227+
Currently supported languages:
228+
- 🇺🇸 English
229+
- 🇧🇩 Bengali (বাংলা)
230+
231+
## 🔧 Development Guidelines
232+
233+
### Code Style
234+
- **TypeScript**: Strict mode enabled for type safety
235+
- **ESLint**: Enforced code quality rules
236+
- **Prettier**: Consistent code formatting
237+
- **Conventional Commits**: Structured commit messages
238+
239+
### Component Architecture
240+
- **Atomic Design**: Reusable component architecture
241+
- **Render Props**: Logic separation with render props pattern
242+
- **Custom Hooks**: Reusable stateful logic
243+
- **Type Safety**: Comprehensive TypeScript coverage
244+
245+
246+
## 📖 Documentation
247+
248+
Comprehensive documentation is available in the `/docs` directory:
249+
250+
- **[Component Documentation](docs/components/README.md)** - Custom components guide
251+
- **[Hooks Documentation](docs/hooks/README.md)** - Custom hooks reference
252+
- **[PRD](docs/PRD.md)** - Product Requirements Document
253+
- **[API Documentation](docs/api/README.md)** - Backend API reference
254+
255+
## 🚢 Deployment
256+
257+
### Production Requirements
258+
- **Node.js 18+** runtime environment
259+
- **PostgreSQL 14+** database
260+
- **MeilSearch** search service
261+
- **Cloudinary** for image storage
262+
- **GitHub OAuth** application
263+
264+
### Recommended Hosting
265+
- **Vercel** - Frontend and API hosting
266+
- **Railway/Supabase** - PostgreSQL database
267+
- **Meilisearch Cloud** - Search service
268+
- **Cloudinary** - Image CDN
269+
270+
### Environment Setup
271+
1. Set up production environment variables
272+
2. Configure database with SSL
273+
3. Set up MeilSearch with proper indexes
274+
4. Configure Cloudinary transformations
275+
5. Set up GitHub OAuth for production domain
276+
277+
## 🤝 Contributing
278+
279+
We welcome contributions from the community! Please read our contributing guidelines:
280+
281+
1. **Fork the repository**
282+
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
283+
3. **Make your changes**: Follow our code style and conventions
284+
4. **Write tests**: Ensure your changes are tested
285+
5. **Submit a pull request**: With a clear description of changes
286+
287+
### Development Setup
288+
1. Follow the Quick Start guide
289+
2. Read the component and hooks documentation
290+
3. Check existing issues or create new ones
291+
4. Join our Discord community for discussions
292+
293+
## 📄 License
294+
295+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
18296

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
297+
## 🙏 Acknowledgments
20298

21-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
299+
- **Next.js Team** - For the amazing React framework
300+
- **Vercel** - For deployment and hosting platform
301+
- **shadcn** - For the beautiful UI component library
302+
- **MeilSearch** - For the powerful search engine
303+
- **Open Source Community** - For the incredible tools and libraries
22304

23-
## Learn More
305+
## 📞 Support & Community
24306

25-
To learn more about Next.js, take a look at the following resources:
307+
- **Website**: [techdiary.dev](https://techdiary.dev)
308+
- **Discord**: [Join our community](https://go.techdiary.dev/discord)
309+
- **GitHub Issues**: [Report bugs or request features](https://github.com/techdiary-dev/techdiary.dev/issues)
310+
- **Email**: [email protected]
26311

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
312+
---
29313

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
314+
<div align="center">
31315

32-
## Deploy on Vercel
316+
**Built with ❤️ by the TechDiary Team**
33317

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
318+
[⭐ Star this repo](https://github.com/techdiary-dev/techdiary.dev)[🐛 Report Bug](https://github.com/techdiary-dev/techdiary.dev/issues)[✨ Request Feature](https://github.com/techdiary-dev/techdiary.dev/issues)
35319

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
320+
</div>

0 commit comments

Comments
 (0)