Skip to content

Commit 10e0826

Browse files
feat: Update README.md with comprehensive project documentation
- Add detailed project description and features - Include tech stack and installation instructions - Document project structure and components - Add Persian/Farsi language support information - Include responsive design details - Document GraphQL integration - Add version 1.0.0 release notes
1 parent 39c9720 commit 10e0826

File tree

2 files changed

+127
-8
lines changed

2 files changed

+127
-8
lines changed

README.md

Lines changed: 126 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,131 @@
1-
# React + Vite
1+
# GraphQL Blog
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+
A modern, responsive blog application built with React, Vite, Material-UI, and GraphQL.
44

5-
Currently, two official plugins are available:
5+
## 🚀 Features
66

7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7+
- **Modern React Architecture**: Built with React 19 and Vite for fast development
8+
- **GraphQL Integration**: Powered by Apollo Client for efficient data fetching
9+
- **Responsive Design**: Material-UI components with custom theming
10+
- **Persian/Farsi Support**: Full RTL support with custom Persian fonts (YekanBakh)
11+
- **Mobile-First**: Conditional rendering with BottomAppBar for mobile devices
12+
- **Navigation**: React Router DOM for seamless page transitions
13+
- **Author System**: Author profiles and dedicated author pages
14+
- **Blog Management**: Create, read, and manage blog posts
15+
- **Clean UI**: Modern card-based layout with hover effects
916

10-
## Expanding the ESLint configuration
17+
## 🛠️ Tech Stack
1118

12-
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
19+
- **Frontend**: React 19, Vite
20+
- **Styling**: Material-UI (MUI), Emotion
21+
- **Data Fetching**: Apollo Client, GraphQL
22+
- **Routing**: React Router DOM
23+
- **Icons**: Material-UI Icons
24+
- **Build Tool**: Vite
25+
- **Linting**: ESLint
26+
27+
## 📦 Installation
28+
29+
1. Clone the repository:
30+
```bash
31+
git clone <repository-url>
32+
cd Blog_graphql
33+
```
34+
35+
2. Install dependencies:
36+
```bash
37+
npm install
38+
```
39+
40+
3. Start the development server:
41+
```bash
42+
npm run dev
43+
```
44+
45+
4. Build for production:
46+
```bash
47+
npm run build
48+
```
49+
50+
## 🏗️ Project Structure
51+
52+
```
53+
src/
54+
├── components/
55+
│ ├── home/
56+
│ │ ├── Hero.jsx
57+
│ │ ├── Authors.jsx
58+
│ │ └── RecentPosts.jsx
59+
│ ├── layout/
60+
│ │ ├── Header.jsx
61+
│ │ ├── Footer.jsx
62+
│ │ ├── BottomAppBar.jsx
63+
│ │ └── DefaultLayout.jsx
64+
│ ├── shared/
65+
│ │ ├── CardEL.jsx
66+
│ │ └── Loader.jsx
67+
│ └── ui/
68+
├── pages/
69+
│ └── Home/
70+
├── assets/
71+
│ ├── fonts/
72+
│ ├── images/
73+
│ ├── mui/
74+
│ └── styles/
75+
├── graphql/
76+
│ ├── queries.js
77+
│ └── mutations.js
78+
├── App.jsx
79+
└── main.jsx
80+
```
81+
82+
## 🎨 Features
83+
84+
### Responsive Header
85+
- Desktop: Traditional AppBar with navigation menu
86+
- Mobile: BottomAppBar for better mobile UX
87+
88+
### Persian Typography
89+
- Custom YekanBakh font family
90+
- RTL text support
91+
- Proper Persian text rendering
92+
93+
### GraphQL Integration
94+
- Efficient data fetching with Apollo Client
95+
- Author and blog post queries
96+
- Optimized caching
97+
98+
## 📱 Components
99+
100+
### CardEL
101+
Reusable card component for displaying blog posts with:
102+
- Author avatar and name
103+
- Blog title and excerpt
104+
- Cover image
105+
- Read more functionality
106+
107+
### Authors
108+
Author listing component with:
109+
- Author avatars
110+
- Clickable author profiles
111+
- Smooth hover effects
112+
113+
## 🚀 Scripts
114+
115+
- `npm run dev` - Start development server
116+
- `npm run build` - Build for production
117+
- `npm run lint` - Run ESLint
118+
- `npm run preview` - Preview production build
119+
120+
## 🌟 Version 1.0.0
121+
122+
Initial release featuring:
123+
- Complete blog system
124+
- Author management
125+
- Responsive design
126+
- Persian language support
127+
- GraphQL integration
128+
129+
## 📄 License
130+
131+
This project is licensed under the MIT License.

src/components/comment/Comments.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function Comments({ slug }) {
2727
<Typography component="p" variant="h6" fontWeight={700} color="primary">
2828
کامنت های این پست رو بخونید
2929
</Typography>
30-
{data.length > 0 ? (
30+
{data.comments.length > 0 ? (
3131
data.comments.map((comment) => (
3232
<Grid
3333
key={comment.id}

0 commit comments

Comments
 (0)