Skip to content

Commit f433e87

Browse files
committed
fix: update documentation, add local development setup, update usage and contributing guidelines
1 parent 7dd4fc0 commit f433e87

3 files changed

Lines changed: 88 additions & 14 deletions

File tree

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,34 @@ We welcome contributions of all skill levels.
1212

1313
---
1414

15+
## Local Setup Steps
16+
17+
1. **Set up your own MongoDB database**
18+
- Use MongoDB Atlas (free tier) or run MongoDB locally.
19+
2. **Copy environment variables**
20+
- Copy `.env.example` to `.env`:
21+
```bash
22+
cp .env.example .env
23+
```
24+
- Fill in your own values for `MONGODB_URI` and other variables in `.env`.
25+
3. **Seed the database**
26+
- Run the seed script to populate your local database with sample data:
27+
```bash
28+
npm run seed
29+
```
30+
4. **Start the development server**
31+
- Run:
32+
```bash
33+
npm run dev
34+
```
35+
5. **Lint your code before committing**
36+
- Run:
37+
```bash
38+
npm run lint
39+
```
40+
41+
---
42+
1543
## Before You Start
1644
- Please read our [Code of Conduct](./CODE_OF_CONDUCT.md)
1745
- Review our [Usage Guide](./docs/usage.md) to set up the backend locally

README.md

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ New contributors can help with APIs, database models, and documentation.
7474
---
7575

7676

77+
7778
## Quick Start
7879

7980
See the [Usage Guide](docs/usage.md) for full setup.
@@ -96,6 +97,38 @@ npm run dev
9697

9798
---
9899

100+
## Local Development Setup
101+
102+
To work on this project locally, follow these steps:
103+
104+
1. **Set up your own MongoDB database**
105+
- You can use [MongoDB Atlas](https://www.mongodb.com/atlas/database) (free tier) or run MongoDB locally.
106+
2. **Copy environment variables**
107+
- Copy `.env.example` to `.env`:
108+
```bash
109+
cp .env.example .env
110+
```
111+
- Fill in your own values for `MONGODB_URI` and other variables in `.env`.
112+
3. **Seed the database**
113+
- Run the seed script to populate your local database with sample data:
114+
```bash
115+
npm run seed
116+
```
117+
4. **Start the development server**
118+
- Run:
119+
```bash
120+
npm run dev
121+
```
122+
5. **Lint your code before committing**
123+
- Run:
124+
```bash
125+
npm run lint
126+
```
127+
6. **Ready to contribute!**
128+
- Pick an issue, create a branch, and start coding.
129+
130+
---
131+
99132
## Features
100133

101134
- Simple **Express.js backend** ready to extend
@@ -136,22 +169,25 @@ Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to
136169

137170
---
138171

172+
139173
## Hacktoberfest Contribution Guide
140174

141175
1. Fork this repository
142-
2. Check our [Project Board](https://github.com/orgs/OpenCodeChicago/projects/2)
143-
- Look for an issue you’d like to work on
144-
- Comment on the issue to let others know you’re taking it
145-
- Maintainers may assign you to it (to avoid duplicates)
176+
2. Check our [Project Board](https://github.com/orgs/OpenCodeChicago/projects/2)
177+
- Look for an issue you’d like to work on
178+
- Comment on the issue to let others know you’re taking it
179+
- Maintainers may assign you to it (to avoid duplicates)
146180
3. Create a new branch:
147-
```bash
148-
git checkout -b my-new-feature
149-
```
150-
4. Make your changes (small, clear commits)
151-
5. Run `npm run lint` before pushing
152-
6. Open a Pull Request
153-
- All PRs are automatically checked for linting in CI
154-
- Tip: Start with [Good First Issues](https://github.com/OpenCodeChicago/hacktoberfest-2025-backend/labels/good%20first%20issue)
181+
```bash
182+
git checkout -b my-new-feature
183+
```
184+
4. Set up your local environment (see above)
185+
- Make sure your `.env` is configured and your database is seeded
186+
5. Make your changes (small, clear commits)
187+
6. Run `npm run lint` before pushing
188+
7. Open a Pull Request
189+
- All PRs are automatically checked for linting in CI
190+
- Tip: Start with [Good First Issues](https://github.com/OpenCodeChicago/hacktoberfest-2025-backend/labels/good%20first%20issue)
155191

156192
---
157193

docs/usage.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,25 @@ This document explains how to set up and run the backend locally.
2424
npm install
2525
```
2626
3. **Set up environment variables**
27-
Create a `.env` file in the project root:
27+
Copy `.env.example` to `.env`:
28+
```bash
29+
cp .env.example .env
30+
```
31+
Edit `.env` and fill in your own values for `MONGODB_URI` and other variables.
32+
Example:
2833
```bash
2934
PORT=5000
3035
# Local MongoDB
3136
MONGODB_URI=mongodb://localhost:27017/hacktoberfest
3237
# or MongoDB Atlas
3338
# MONGODB_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/hacktoberfest
3439
```
35-
4. **Start the server**
40+
4. **Seed the database**
41+
Run the seed script to populate your local database with sample data:
42+
```bash
43+
npm run seed
44+
```
45+
5. **Start the server**
3646
```bash
3747
npm run dev
3848
```

0 commit comments

Comments
 (0)