https://github.com/iv0ks/devcamp
Welcome to the Devcamp, a comprehensive bootcamp management application built with the MERN stack (MongoDB, Express.js, React, Node.js). It's designed to streamline the management of coding bootcamps, enhancing the experience for administrators, instructors, and students.
https://github.com/iv0ks/devcamp
bcryptjs cookie-parser dotenv express express-rate-limit helmetjs hpp jsonwebtoken mern-stack mongo-sanitize mongodb mongoose morgan nodejs nodemailer reactjs
Last synced: 2 months ago
JSON representation
Welcome to the Devcamp, a comprehensive bootcamp management application built with the MERN stack (MongoDB, Express.js, React, Node.js). It's designed to streamline the management of coding bootcamps, enhancing the experience for administrators, instructors, and students.
- Host: GitHub
- URL: https://github.com/iv0ks/devcamp
- Owner: gucasassi
- License: gpl-3.0
- Created: 2023-11-24T12:59:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-16T17:08:55.000Z (over 2 years ago)
- Last Synced: 2025-01-05T06:17:52.546Z (over 1 year ago)
- Topics: bcryptjs, cookie-parser, dotenv, express, express-rate-limit, helmetjs, hpp, jsonwebtoken, mern-stack, mongo-sanitize, mongodb, mongoose, morgan, nodejs, nodemailer, reactjs
- Language: JavaScript
- Homepage: https://devcamp.gucasassi.com
- Size: 213 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://nodejs.org/)
[](https://pnpm.io/)
[](https://github.com/gucasassi/devcamp/releases/latest)
[](https://github.com/gucasassi/devcamp/actions/workflows/release.yml)
[](https://sonarcloud.io/summary/new_code?id=gucasassi_devcamp)
# DevCamp API
An API built entirely with **Node.js** and **Express** designed to streamline the administration and delivery of educational bootcamps and courses. This project serves as a comprehensive demonstration of building **scalable and secure** backend systems.
## 📋 Setup (Local Development)
Follow these steps to configure and run the project in your local environment.
### Prerequisites
Ensure your development environment has the following tools installed with the recommended versions:
- [Node.js](https://nodejs.org/): `v24.10.0` or greater.
- [PNPM](https://pnpm.io/): `v10.19.0` or greater.
- [Docker](https://www.docker.com/): Required to run the database locally.
Ready to get started? Just follow the next sections to [set up](#set-up) your environment.
### 1. Clone the Repository
Open your terminal and clone the project:
```sh
git clone https://github.com/gucasassi/devcamp.git && cd devcamp
```
### 2. Install Dependencies
Use PNPM to install all project dependencies:
```sh
pnpm i
```
### 3. Configure the Database (MongoDB)
To simplify local development, it is recommended to use the provided `docker-compose.yml` file to start **MongoDB** in a container. Start the database container:
```sh
docker compose up -d mongodb
```
> Note: The MongoDB instance will be accessible at mongodb://172.17.0.1:27017.
### 4. Environment Variables
Create a `.env` file in the project root to store your environment variables. Use the following example as a template:
```sh
NODE_ENV=development
APP_PORT=3000
# Ensure this URI matches your Docker container's address.
MONGO_URI=mongodb://172.17.0.1:27017/devcamp
```
### 5. Seed the Database (Required)
Before running the application, you must seed the database with sample data. Run the following command from the project root:
```sh
pnpm seed
```
This will insert the data from the files in the `_data` folder into your configured database.
### 6. Running the Project
Once the setup and seeding are complete, you can start the API in development mode:
```sh
# Starts the server using nodemon for automatic restarts.
pnpm dev
```
The API will be running at `http://localhost:3000` (or the port specified in your .env file).
## ▶️ Run with Docker
If you just want to test the API without a full local installation, you can directly run the [Docker](https://www.docker.com/) image from [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) (GHCR).
### 1. Get the Setup Files
You need the `docker-compose.yml` (for MongoDB) and create the `.env` file.
```sh
git clone https://github.com/gucasassi/devcamp.git && cd devcamp
```
Create the `.env` file.
```sh
nano .env
```
Content for `.env`:
```sh
NODE_ENV=production
APP_PORT=3000
MONGO_URI=mongodb://172.17.0.1:27017/devcamp
```
### 2. Start the Database
Ensure the `mongodb` container is running locally using `docker compose`:
```sh
docker compose up -d mongodb
```
### 3. Seed the Database (Required)
Before running the application, you must seed the database with sample data. Run the following command from the project root:
```sh
pnpm seed
```
This will insert the data from the files in the `_data` folder into your configured database.
### 4. Run the API
Pull and run the latest stable image of `devcamp`, mapping the application port `3000` and using your local `.env` file for configuration.
```sh
docker run -dit \
-p 3000:3000 \
--name devcamp \
--env-file .env \
ghcr.io/gucasassi/devcamp:latest
```
The API will be accessible at `http://localhost:3000`.