|
1 | | -<div align="center"><a name="readme-top"></a> |
| 1 | +<div align="center"> |
| 2 | + <a href="https://gaoredu.com" title="ReactPress"> |
| 3 | + <img height="180" src="./public/logo.png" alt="ReactPress Logo"> |
| 4 | + </a> |
| 5 | + |
| 6 | + <h1>ReactPress</h1> |
| 7 | + |
| 8 | + <p align="center"> |
| 9 | + <em>Modern, Full-Stack Publishing Platform Built with React, Next.js, and NestJS</em> |
| 10 | + </p> |
| 11 | + |
| 12 | + [](https://github.com/fecommunity/reactpress/blob/master/LICENSE) |
| 13 | + [](https://www.npmjs.com/package/@fecommunity/reactpress) |
| 14 | + [](https://github.com/fecommunity/reactpress/pulls) |
| 15 | + [](http://www.typescriptlang.org/) |
| 16 | + [](https://vercel.com/new/clone?repository-url=https://github.com/fecommunity/reactpress) |
| 17 | + |
| 18 | + <p> |
| 19 | + <a href="https://github.com/fecommunity/reactpress/issues">Report Bug</a> |
| 20 | + · |
| 21 | + <a href="https://github.com/fecommunity/reactpress/issues">Request Feature</a> |
| 22 | + · |
| 23 | + <a href="./README-zh_CN.md">中文文档</a> |
| 24 | + </p> |
| 25 | +</div> |
2 | 26 |
|
3 | | -<a href="https://gaoredu.com" title="ReactPress"><img height="180" src="./public/logo.png"></a> |
| 27 | +## 🌟 Modern Publishing Platform |
4 | 28 |
|
| 29 | +**ReactPress** is a full-stack publishing platform that empowers developers and content creators to build professional blogs, websites, and content management systems. Built with modern web technologies, it offers an excellent development and user experience. |
5 | 30 |
|
6 | | -[](https://gaoredu.com) |
| 31 | +[](https://gaoredu.com) |
7 | 32 |
|
8 | | -## Introduction |
| 33 | +## ✨ Key Features |
9 | 34 |
|
10 | | -`ReactPress` is an open-source publishing platform developed using the React. Users can set up their own blogs and websites on servers that support React and MySQL databases. `ReactPress` can also be used as a content management system (CMS). |
| 35 | +### 🚀 Performance Optimized |
| 36 | +- **Server-Side Rendering** with Next.js for optimal SEO and initial load |
| 37 | +- **Code Splitting** and lazy loading for efficient resource management |
| 38 | +- **Image Optimization** with Next.js Image component |
11 | 39 |
|
12 | | -[](https://github.com/fecommunity/reactpress/blob/master/LICENSE)[](https://github.com/fecommunity/reactpress/blob/master/package.json) [](https://github.com/fecommunity/reactpress/blob/master/client/tsconfig.json) [](https://github.com/fecommunity/reactpress/pulls) |
| 40 | +### 🎨 Beautiful, Responsive Design |
| 41 | +- **Dark/Light Theme** switching with seamless transition |
| 42 | +- **Mobile-First** responsive design for all devices |
| 43 | +- **Ant Design v5** for a polished, professional UI |
13 | 44 |
|
14 | | -[Issues](https://github.com/fecommunity/reactpress/issues) · [Pull Request](https://github.com/fecommunity/reactpress/pulls) · English · [中文](./README-zh_CN.md) |
15 | | -</div> |
| 45 | +### 🔧 Developer Experience |
| 46 | +- **TypeScript** for type safety and better tooling |
| 47 | +- **Modular Architecture** for easy customization and extension |
| 48 | +- **Auto-Generated API Toolkit** for seamless frontend-backend integration |
| 49 | +- **Hot Reload** development with instant feedback |
16 | 50 |
|
17 | | -## 💻 Architecture |
| 51 | +### 🌍 Internationalization |
| 52 | +- **Multi-Language Support** (Chinese & English) |
| 53 | +- **Localized Content** management |
18 | 54 |
|
19 | | -[](https://blog.gaoredu.com) |
| 55 | +### 🔐 Security Features |
| 56 | +- **JWT Authentication** for secure user sessions |
| 57 | +- **Rate Limiting** to prevent abuse |
| 58 | +- **Input Validation** and sanitization |
| 59 | +- **Helmet.js** for HTTP header security |
20 | 60 |
|
21 | | -## 🔥 Live Demo |
| 61 | +## 📸 Screenshots |
22 | 62 |
|
23 | | -[](https://blog.gaoredu.com) |
| 63 | +### Content Management Dashboard |
| 64 | +[](https://blog.gaoredu.com) |
24 | 65 |
|
25 | | -[ReactPress Demo](https://blog.gaoredu.com/) |
| 66 | +### Elegant Home Page |
| 67 | +[](https://blog.gaoredu.com) |
26 | 68 |
|
27 | | -https://github.com/user-attachments/assets/594f2e92-7343-4885-a4b4-1d3216961fd4 |
| 69 | +### Mobile Responsive Design |
| 70 | +[](https://blog.gaoredu.com) |
28 | 71 |
|
| 72 | +## 🆚 Technology Comparison |
29 | 73 |
|
30 | | -[](https://blog.gaoredu.com) |
| 74 | +| Feature | ReactPress | WordPress | VuePress | |
| 75 | +|--------|------------|-----------|----------| |
| 76 | +| **Technology Stack** | React + Next.js + NestJS + MySQL | PHP + MySQL | Vue.js | |
| 77 | +| **Performance** | ⚡ SSR, Code Splitting | Plugin Dependent | Static Generation | |
| 78 | +| **Developer Experience** | ✅ TypeScript, Modern Tooling | ⚠️ PHP Legacy | ✅ Vue Ecosystem | |
| 79 | +| **Customization** | 🎨 Component-Based | 🧩 Plugin-Based | 📄 Theme-Based | |
| 80 | +| **Security** | 🔐 Modern Security Practices | ⚠️ Plugin Vulnerabilities | 🔒 Static Site | |
| 81 | +| **Deployment** | 🚀 Vercel, Docker, PM2 | 🐳 Traditional Hosting | 📦 Static Deployment | |
31 | 82 |
|
| 83 | +## 🚀 Quick Start |
32 | 84 |
|
33 | | -**Content Management** |
| 85 | +### One-Command Installation |
| 86 | +```bash |
| 87 | +# Install and start ReactPress server |
| 88 | +npx @fecommunity/reactpress-server |
34 | 89 |
|
35 | | -[](https://blog.gaoredu.com) |
| 90 | +# In another terminal, start the client |
| 91 | +npx @fecommunity/reactpress-client |
| 92 | +``` |
36 | 93 |
|
37 | | -**Home Page** |
| 94 | +### Manual Installation |
| 95 | +```bash |
| 96 | +# Clone the repository |
| 97 | +git clone --depth=1 https://github.com/fecommunity/reactpress.git |
| 98 | +cd reactpress |
38 | 99 |
|
39 | | -[](https://blog.gaoredu.com) |
| 100 | +# Install dependencies |
| 101 | +npm install -g pnpm |
| 102 | +pnpm install |
40 | 103 |
|
41 | | -**Navigation** |
| 104 | +# Start development servers |
| 105 | +pnpm run dev |
| 106 | +``` |
42 | 107 |
|
43 | | -[](https://blog.gaoredu.com) |
| 108 | +Visit [http://localhost:3001](http://localhost:3001) to see your new ReactPress site! |
44 | 109 |
|
45 | | -## 🆚 Comparison |
| 110 | +## 🐳 Docker Deployment |
46 | 111 |
|
47 | | -**Comparison of ReactPress, WordPress, and VuePress** |
| 112 | +ReactPress can be easily deployed using Docker with a single command: |
48 | 113 |
|
49 | | -| **Feature** | **ReactPress** | **WordPress** | **VuePress** | |
50 | | -| ----------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------- | |
51 | | -| **Technology Stack** | React + NextJS + MySQL + NestJS | PHP + MySQL | Vue.js | |
52 | | -| **Type** | Open-source publishing platform / CMS | Open-source publishing platform / CMS | Static site generator / Documentation tool | |
53 | | -| **Front-end & Back-end Separation** | Supported | Not supported (traditional approach) | Supported | |
54 | | -| **Component-based Development** | Supported | Limited support (via plugins and themes) | Supported | |
55 | | -| **Performance Optimization** | Virtual DOM, Code Splitting, Lazy Loading | Plugin-dependent optimization | Static page generation, excellent performance | |
56 | | -| **SEO Performance** | Excellent (SSR support) | Good | Outstanding (static pages) | |
57 | | -| **Customizability** | High (fully customizable themes and styles) | High (via plugins and themes) | Moderate (theme and component customization) | |
58 | | -| **Extensibility** | Strong (API interfaces, independent front-end and back-end extensions) | Strong (plugin extensions) | Moderate (plugin and theme extensions) | |
59 | | -| **User Interface** | Modern, component-based design based on React | User-friendly backend interface | Minimalist, optimized for technical documentation | |
60 | | -| **Security** | Depends on the security of the framework and database | Depends on plugin and theme updates and maintenance | Static site, high security | |
61 | | -| **Application Scenarios** | Complex functionality, high concurrent access, SEO optimization needs | Quick website setup, content publishing, and management | Technical documentation, static blogs | |
62 | | -| **User Groups** | Developers, technical teams,Personal blogs,small businesses | Personal blogs, small businesses, startups | Technical documentation writers, developers | |
63 | | -| **Community Support** | Active and growing | Very active, with a large user base | Supported by the Vue.js community | |
| 114 | +```bash |
| 115 | +# Clone the repository |
| 116 | +git clone --depth=1 https://github.com/fecommunity/reactpress.git |
| 117 | +cd reactpress |
64 | 118 |
|
65 | | -## ✨ Features |
| 119 | +# Start all services with Docker Compose |
| 120 | +docker-compose up -d |
| 121 | +``` |
66 | 122 |
|
67 | | -- 📦 Technology Stack: Built on React+MySQL+NestJS+NextJS |
68 | | -- 🌈 Componentization: an interactive language and visual style based on antd |
69 | | -- 🌍 Internationalization: Supports switching between Chinese and English, with international configuration management capabilities |
70 | | -- 🌞 Black and White Theme: Supports free switching between light and dark mode themes |
71 | | -- 🖌️ Creation Management: Built in 'MarkDown' editor, supporting article writing, category and directory management, and tag management |
72 | | -- 📃 Page management: supports customizing new pages |
73 | | -- 💬 Comment management: supports content comment management |
74 | | -- 📷 Media Management: Supports local file upload and OSS file upload |
75 | | -- ... |
| 123 | +This will start three containers: |
| 124 | +- **MySQL Database** (port 3306) |
| 125 | +- **ReactPress Server** (port 3002) |
| 126 | +- **ReactPress Client** (port 3001) |
76 | 127 |
|
77 | | -## ⌨️ Development |
| 128 | +Visit [http://localhost:3001](http://localhost:3001) to access your ReactPress site. |
78 | 129 |
|
79 | | -### Environment |
| 130 | +### Docker Environment Configuration |
80 | 131 |
|
81 | | -```bash |
82 | | -$ git clone --depth=1 https://github.com/fecommunity/reactpress.git |
83 | | -$ cd reactpress |
84 | | -$ npm i -g pnpm |
85 | | -$ pnpm i |
| 132 | +The Docker deployment uses environment variables from your `.env` file. Make sure to configure the following: |
| 133 | + |
| 134 | +```env |
| 135 | +# Database Config |
| 136 | +DB_HOST=mysql |
| 137 | +DB_PORT=3306 |
| 138 | +DB_USER=reactpress |
| 139 | +DB_PASSWD=reactpress |
| 140 | +DB_DATABASE=reactpress |
| 141 | +
|
| 142 | +# Client Config |
| 143 | +CLIENT_SITE_URL=http://localhost:3001 |
| 144 | +CLIENT_PORT=3001 |
| 145 | +
|
| 146 | +# Server Config |
| 147 | +SERVER_SITE_URL=http://localhost:3002 |
| 148 | +SERVER_PORT=3002 |
| 149 | +
|
| 150 | +# Security Config |
| 151 | +JWT_SECRET=your-secure-jwt-secret |
| 152 | +JWT_EXPIRES_IN=24h |
| 153 | +
|
| 154 | +# SMTP Config (Optional) |
| 155 | +SMTP_HOST= |
| 156 | +SMTP_PORT= |
| 157 | +SMTP_USER= |
| 158 | +SMTP_PASS= |
| 159 | +SMTP_FROM= |
86 | 160 | ``` |
87 | 161 |
|
88 | | -### Configuration |
| 162 | +## 💻 System Architecture |
89 | 163 |
|
90 | | -After the project starts, the `.env ` configuration file in the root directory will be loaded. Please ensure that the MySQL database service is consistent with the following configuration, and create the `reactpress` database in advance |
| 164 | +[](https://blog.gaoredu.com) |
91 | 165 |
|
92 | | -```js |
93 | | -DB_HOST=127.0.0.1 // Default Database Host |
94 | | -DB_PORT=3306 // Default Database Port |
95 | | -DB_USER=reactpress // Default Username |
96 | | -DB_PASSWD=reactpress // Default Password |
97 | | -DB_DATABASE=reactpress // Default Database Name |
| 166 | +ReactPress follows a **modular architecture** with clearly separated concerns: |
| 167 | + |
| 168 | +- **Frontend**: Next.js for SSR and client-side rendering |
| 169 | +- **Backend**: NestJS for scalable, maintainable server-side logic |
| 170 | +- **Database**: MySQL with TypeORM for data persistence |
| 171 | +- **API Layer**: Auto-generated TypeScript SDK for seamless integration |
| 172 | + |
| 173 | +## 🛠️ Technology Stack |
| 174 | + |
| 175 | +| Layer | Technology | Version | |
| 176 | +|-------|------------|---------| |
| 177 | +| **Frontend** | React | 17.0.2 | |
| 178 | +| | Next.js | 12.3.4 | |
| 179 | +| | TypeScript | 4.6.2 | |
| 180 | +| | Ant Design | 5.24.4 | |
| 181 | +| **Backend** | NestJS | 6.7.2 | |
| 182 | +| | Node.js | 18.20.4+ | |
| 183 | +| | TypeScript | 4.1.6 | |
| 184 | +| | TypeORM | 0.2.22 | |
| 185 | +| **Database** | MySQL | 5.7+ | |
| 186 | +| **Build Tool** | pnpm | 10.12.1 | |
| 187 | +| **Package Manager** | pnpm | 10.12.1 | |
| 188 | + |
| 189 | +## 📦 Packages |
| 190 | + |
| 191 | +ReactPress is organized as a monorepo with multiple packages: |
| 192 | + |
| 193 | +| Package | Description | Version | |
| 194 | +|---------|-------------|---------| |
| 195 | +| [`@fecommunity/reactpress`](https://github.com/fecommunity/reactpress) | Main package with all components | 1.11.0 | |
| 196 | +| [`@fecommunity/reactpress-client`](https://github.com/fecommunity/reactpress/tree/master/client) | Next.js frontend application | 1.0.0-beta.23 | |
| 197 | +| [`@fecommunity/reactpress-server`](https://github.com/fecommunity/reactpress/tree/master/server) | NestJS backend API | 1.0.0-beta.48 | |
| 198 | +| [`@fecommunity/reactpress-toolkit`](https://github.com/fecommunity/reactpress/tree/master/toolkit) | Auto-generated API client SDK | 1.0.0-beta.2 | |
| 199 | +| [`@fecommunity/reactpress-config`](https://github.com/fecommunity/reactpress/tree/master/config) | Shared configuration files | 1.0.0-beta.34 | |
| 200 | + |
| 201 | +## 🔧 Configuration |
| 202 | + |
| 203 | +Create a `.env` file in the root directory: |
| 204 | + |
| 205 | +```env |
| 206 | +# Database Config |
| 207 | +DB_HOST=127.0.0.1 |
| 208 | +DB_PORT=3306 |
| 209 | +DB_USER=reactpress |
| 210 | +DB_PASSWD=reactpress |
| 211 | +DB_DATABASE=reactpress |
| 212 | +
|
| 213 | +# Client Config |
| 214 | +CLIENT_SITE_URL=http://localhost:3001 |
| 215 | +CLIENT_PORT=3001 |
| 216 | +
|
| 217 | +# Server Config |
| 218 | +SERVER_SITE_URL=http://localhost:3002 |
| 219 | +SERVER_PORT=3002 |
| 220 | +
|
| 221 | +# Security Config |
| 222 | +JWT_SECRET=your-secure-jwt-secret |
| 223 | +JWT_EXPIRES_IN=24h |
| 224 | +
|
| 225 | +# SMTP Config (Optional) |
| 226 | +SMTP_HOST= |
| 227 | +SMTP_PORT= |
| 228 | +SMTP_USER= |
| 229 | +SMTP_PASS= |
| 230 | +SMTP_FROM= |
98 | 231 | ``` |
99 | 232 |
|
100 | | -After the environment is ready, execute the startup shell: |
| 233 | +## 🚀 Deployment |
| 234 | + |
| 235 | +### Deploy with Vercel |
| 236 | +[](https://vercel.com/new/clone?repository-url=https://github.com/fecommunity/reactpress) |
101 | 237 |
|
| 238 | +### Docker Deployment |
102 | 239 | ```bash |
103 | | -$ pnpm run dev |
| 240 | +# Start all services with Docker Compose |
| 241 | +docker-compose up -d |
104 | 242 | ``` |
105 | 243 |
|
106 | | -Open your browser and visit http://127.0.0.1:3001 |
| 244 | +### Traditional Deployment |
| 245 | +```bash |
| 246 | +# Build for production |
| 247 | +pnpm run build |
107 | 248 |
|
| 249 | +# Start production servers |
| 250 | +pnpm run start |
| 251 | +``` |
108 | 252 |
|
109 | | -### Deploy |
| 253 | +## 📚 Documentation |
110 | 254 |
|
111 | | -[](https://vercel.com/new/clone?repository-url=https://github.com/fecommunity/reactpress) |
| 255 | +- [Getting Started Guide](https://github.com/fecommunity/reactpress/wiki) |
| 256 | +- [API Documentation](https://github.com/fecommunity/reactpress/wiki/API-Documentation) |
| 257 | +- [Deployment Guide](https://github.com/fecommunity/reactpress/wiki/Deployment) |
| 258 | +- [Customization Guide](https://github.com/fecommunity/reactpress/wiki/Customization) |
112 | 259 |
|
113 | | -## 🔗 Links |
| 260 | +## 👥 Community & Support |
114 | 261 |
|
115 | | -- [Home](https://github.com/fecommunity/reactpress) |
116 | | -- [ReactPress](https://blog.gaoredu.com/knowledge/c7edfecf-4f47-4bd3-ba93-093e43cf5314/bef19159-4a6f-4343-b84e-b1a636b570f8) |
117 | | -- [Issues](https://github.com/fecommunity/reactpress/issues) |
118 | | -- [Pull Request](https://github.com/fecommunity/reactpress/pulls) |
119 | | -- [next.js](https://github.com/vercel/next.js) |
120 | | -- [nest.js](https://github.com/nestjs/nest) |
| 262 | +- [GitHub Issues](https://github.com/fecommunity/reactpress/issues) - Bug reports and feature requests |
| 263 | +- [GitHub Discussions](https://github.com/fecommunity/reactpress/discussions) - Community discussions and Q&A |
| 264 | +- [Stack Overflow](https://stackoverflow.com/questions/tagged/reactpress) - Technical questions |
| 265 | +- [Twitter](https://twitter.com/reactpress) - Latest updates and news |
121 | 266 |
|
122 | | -## 👥 Contributing |
| 267 | +## 🤝 Contributing |
123 | 268 |
|
124 | | -We warmly invite contributions from everyone. Before you get started, please take a moment to review our [Contributing Guide](https://github.com/fecommunity/reactpress). Feel free to share your ideas through [Pull Requests](https://github.com/fecommunity/reactpress/pulls) or [GitHub Issues](https://github.com/fecommunity/reactpress/issues). If you're interested in enhancing our codebase, explore the [Development Instructions](https://github.com/fecommunity/reactpress/wiki/Development) and enjoy your coding journey! |
| 269 | +We welcome contributions of all kinds! Whether it's bug fixes, new features, documentation improvements, or translations, your help is appreciated. |
125 | 270 |
|
126 | | -1. [GitHub Discussions](https://github.com/fecommunity/reactpress/discussions) |
127 | | -2. [Stack Overflow](http://stackoverflow.com/questions/tagged/antd)(English) |
128 | | -3. [Segment Fault](https://segmentfault.com/t/reactpress)(Chinese) |
| 271 | +1. Fork the repository |
| 272 | +2. Create your feature branch (`git checkout -b feature/AmazingFeature`) |
| 273 | +3. Commit your changes (`git commit -m 'Add some AmazingFeature'`) |
| 274 | +4. Push to the branch (`git push origin feature/AmazingFeature`) |
| 275 | +5. Open a Pull Request |
129 | 276 |
|
130 | | -You can also send me an email: [email protected] |
| 277 | +Please read our [Contributing Guide](https://github.com/fecommunity/reactpress/blob/master/CONTRIBUTING.md) for details on our code of conduct and development process. |
131 | 278 |
|
132 | 279 | ## ❤️ Acknowledgments |
133 | 280 |
|
134 | | -The ReactPress project has been greatly inspired and assisted by the following open-source projects: |
| 281 | +ReactPress is inspired by and built upon the work of many amazing open-source projects: |
135 | 282 |
|
136 | | -- **[fantasticit]** - **[wipi]** - [[https://github.com/fantasticit/wipi](https://github.com/fantasticit/wipi)] |
| 283 | +- [Next.js](https://github.com/vercel/next.js) - React framework |
| 284 | +- [NestJS](https://github.com/nestjs/nest) - Progressive Node.js framework |
| 285 | +- [Ant Design](https://github.com/ant-design/ant-design) - UI design language |
| 286 | +- [TypeORM](https://github.com/typeorm/typeorm) - ORM for TypeScript and JavaScript |
137 | 287 |
|
138 | | -- **[Lrunlin]** - **[blog]** - [[https://github.com/Lrunlin/blog](https://github.com/Lrunlin/blog)] |
| 288 | +We're grateful to the authors and contributors of these projects for their excellent work. |
139 | 289 |
|
140 | | -- **[biaochenxuying]** - **[blog-react]** - [[https://github.com/biaochenxuying/blog-react](https://github.com/biaochenxuying/blog-react)] |
| 290 | +## 📈 Star History |
141 | 291 |
|
142 | | -- **[MrXujiang]** - **[next-admin]** - [[https://github.com/MrXujiang/next-admin](https://github.com/MrXujiang/next-admin)] |
143 | | - |
144 | | -- **[lfb]** - **[nodejs-koa-blog]** - [[https://github.com/lfb/nodejs-koa-blog](https://github.com/lfb/nodejs-koa-blog)] |
| 292 | +[](https://star-history.com/#fecommunity/reactpress&Date) |
145 | 293 |
|
146 | | -…… |
| 294 | +## 📄 License |
147 | 295 |
|
148 | | -We extend our heartfelt gratitude to the authors and contributors of these projects! |
| 296 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
149 | 297 |
|
150 | | -## ✨ Star History |
| 298 | +--- |
151 | 299 |
|
152 | | -[](https://star-history.com/#fecommunity/reactpress&Date) |
| 300 | +<div align="center"> |
| 301 | + <sub>Built with ❤️ by <a href="https://github.com/fecommunity">FECommunity</a></sub> |
| 302 | +</div> |
0 commit comments