Skip to content

freeCodeCamp-2025-Summer-Hackathon/mint-syntax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Mint-Syntax Logo

Node.js v22 MongoDB 4.0+ uv enabled Pull Requests Open Issues

Mint-Syntax: 2025 Summer Hackathon

๐Ÿ“ Table of Contents


๐Ÿ“Œ Project

IdeaForge โ€” A collaborative brainstorming board where users can submit, vote, and iterate on ideas together.


๐Ÿ‘ฅ Team


โš™๏ธ Development

Prerequisites

Frontend

  • Node 22, recommended installation via nvm

Backend

Setup

Copy .env file

/$ cp sample.env .env

If needed, update MONGODB_URI in .env file.

Frontend

/$ cd frontend
/frontend$ npm install

Note: The dependency on the helmet-async has been removed recently - if you're getting errors, or the page doesn't load after pulling the latest version of the repository, you need to run npm install again. If the problem persists, try rebuilding the dependency list using the following commands:

/frontend$ rm -rf node_modules
/frontend$ rm package-lock.json
/frontend$ npm install

Backend

/$ cd backend
/backend$ uv sync

Enabling pre-commit checks for frontend and backend

/$ cd backend
/backend$ uv run pre-commit install

First commit after this can take a bit longer

Database

Local Database Deployment (MongoDB Community)

This section references the official Install MongoDB Community with Docker Tutorial. Visit the link for more details.

  • Before you begin, install and start Docker
  • No need to make changes to the .env file, as it is already setup to connect to the local database deployment
/$ docker pull mongodb/mongodb-community-server:latest
/$ docker run --name mongodb -p 27017:27017 -d mongodb/mongodb-community-server:latest

Check, if the docker container is running:

/$ docker container ls

The above command should output something similar to below:

CONTAINER ID   IMAGE                                       COMMAND                  CREATED         STATUS         PORTS       NAMES
c29db5687290   mongodb/mongodb-community-server:5.0-ubi8   "docker-entrypoint.sโ€ฆ"   4 seconds ago   Up 3 seconds   27017/tcp   mongo
Cloud Database Deployment (MongoDB Atlas)
  1. Follow the offical MongoDB Atlas Tutorial to create an account, setup a cluster, and access the connection string.
  2. In the .env file, replace the string after "MONGODB_URI=" with the MongoDB Atlas connection string. Don't forget to replace the password placeholder with the password.

Development

Frontend Client

/frontend$ npm run develop

Backend Server

/backend$ uv run fastapi dev src/main.py

Running commands from the root folder

It's possible to run commands without actually navigating to the folder, by running commands in the subshell

/$ (cd frontend && npm run develop)
/$ (cd backend && uv run fastapi dev src/main.py)

Running Seed Script

To seed the database with initial data, run the following command from the /backend directory

/backend$ uv run -m src.scripts.seed_data

Optional -p argument will drop existing collections, and configure them again, before seeding.

/backend$ uv run -m src.scripts.seed_data -p

Running Tests

Frontend

/frontend$ npm run test:browser

Backend

pytest gives multiple options for running all or part of the tests. How to invoke pytest.

Unit tests

Unit tests are using mocked db with very limited capabilities.

/backend$ uv run pytest -m "not integration"
Integration tests

To run integration tests, real MongoDB instance is required, with MONGODB_TEST_URI set in the .env file. Using the same db as for the development should be okay. While tests are expected to setup required data and clean-up afterwards, there's always possiblity of things not going right.

/backend$ uv run pytest -m integration
Running all (unit and integration) backend tests

Requires the same setup as integration tests.

/backend$ uv run pytest
Running individual tests
  1. Mark test(s) to run with additional marker, ie. @pytest.mark.only.
  2. Run only tests with the marker.
/backend$ uv run pytest -m only

About

IdeaForge: A brainstorming board where users can vote and iterate on ideas.

Topics

Resources

Stars

Watchers

Forks

Contributors 8