@@ -27,84 +27,98 @@ A fully-featured Medium-like blog platform built with modern web development too
27
27
28
28
## Project Structure
29
29
30
-
31
- medium-like-blog/ ├── frontend/ # React application ├── backend/ # Cloudflare Workers code ├── prisma/ # Prisma schema and migrations ├── public/ # Static assets ├── scripts/ # Utility scripts └── README.md # Project documentation
32
-
33
- bash
34
- Copy code
30
+ ```
31
+ medium-like-blog/
32
+ ├── frontend/ # React application
33
+ ├── backend/ # Cloudflare Workers code
34
+ ├── prisma/ # Prisma schema and migrations
35
+ ├── public/ # Static assets
36
+ ├── scripts/ # Utility scripts
37
+ └── README.md # Project documentation
38
+ ```
35
39
36
40
## Installation
37
41
38
42
1 . Clone the repository:
39
43
``` bash
40
44
git clone https://github.com/your-username/medium-like-blog.git
41
45
cd medium-like-blog
42
- Install dependencies for the frontend:
43
-
44
- bash
45
- Copy code
46
- cd frontend
47
- npm install
48
- Install dependencies for the backend:
49
-
50
- bash
51
- Copy code
52
- cd ../backend
53
- npm install
54
- Set up the PostgreSQL database:
55
-
56
- Create a new PostgreSQL database.
57
- Update the .env file in the backend/ directory with your database connection string.
58
- Apply Prisma migrations:
59
-
60
- bash
61
- Copy code
62
- npx prisma migrate deploy
63
- Start the development server:
64
-
65
- Frontend:
66
- bash
67
- Copy code
68
- cd frontend
69
- npm start
70
- Backend:
71
- bash
72
- Copy code
73
- cd ../backend
74
- npm run dev
75
- Environment Variables
76
- Create a .env file in the backend/ directory with the following variables:
77
-
78
- makefile
79
- Copy code
46
+ ```
47
+
48
+ 2 . Install dependencies for the frontend:
49
+ ``` bash
50
+ cd frontend
51
+ npm install
52
+ ```
53
+
54
+ 3 . Install dependencies for the backend:
55
+ ``` bash
56
+ cd ../backend
57
+ npm install
58
+ ```
59
+
60
+ 4 . Set up the PostgreSQL database:
61
+ - Create a new PostgreSQL database.
62
+ - Update the ` .env ` file in the ` backend/ ` directory with your database connection string.
63
+
64
+ 5 . Apply Prisma migrations:
65
+ ``` bash
66
+ npx prisma migrate deploy
67
+ ```
68
+
69
+ 6 . Start the development server:
70
+ - Frontend:
71
+ ``` bash
72
+ cd frontend
73
+ npm start
74
+ ```
75
+ - Backend:
76
+ ` ` ` bash
77
+ cd ../backend
78
+ npm run dev
79
+ ` ` `
80
+
81
+ # # Environment Variables
82
+
83
+ Create a ` .env` file in the ` backend/` directory with the following variables:
84
+
85
+ ```
80
86
DATABASE_URL=your-database-url
81
87
JWT_SECRET=your-jwt-secret
82
- Usage
83
- Start the frontend and backend servers as described above.
84
- Access the application at http://localhost:3000.
85
- Create an account, log in, and start writing blog posts!
86
- Contributing
88
+ ```
89
+
90
+ ## Usage
91
+
92
+ 1. Start the frontend and backend servers as described above.
93
+ 2. Access the application .
94
+ 3. Create an account, log in, and start writing blog posts!
95
+
96
+ ## Contributing
97
+
87
98
Contributions are welcome! Please follow these steps:
88
99
89
- Fork the repository.
90
- Create a new branch:
91
- bash
92
- Copy code
93
- git checkout -b feature-name
94
- Commit your changes:
95
- bash
96
- Copy code
97
- git commit -m " Add some feature"
98
- Push to the branch:
99
- bash
100
- Copy code
101
- git push origin feature-name
102
- Open a pull request.
103
- # Acknowledgments
104
- -React
105
- -Cloudflare Workers
106
- -Hono
107
- -Prisma
108
- -PostgreSQL
109
- -Zod
110
- -JWT
100
+ 1. Fork the repository.
101
+ 2. Create a new branch:
102
+ ```bash
103
+ git checkout -b feature-name
104
+ ```
105
+ 3 . Commit your changes:
106
+ ``` bash
107
+ git commit -m " Add some feature"
108
+ ```
109
+ 4 . Push to the branch:
110
+ ``` bash
111
+ git push origin feature-name
112
+ ```
113
+ 5 . Open a pull request.
114
+
115
+ ## Acknowledgments
116
+
117
+ - [ React] ( https://reactjs.org/ )
118
+ - [ Cloudflare Workers] ( https://workers.cloudflare.com/ )
119
+ - [ Hono] ( https://hono.dev/ )
120
+ - [ Prisma] ( https://www.prisma.io/ )
121
+ - [ PostgreSQL] ( https://www.postgresql.org/ )
122
+ - [ Zod] ( https://zod.dev/ )
123
+ - [ JWT] ( https://jwt.io/ )
124
+
0 commit comments