IdeaForge โ A collaborative brainstorming board where users can submit, vote, and iterate on ideas together.
- Node 22, recommended installation via nvm
- MongoDB 4.0+ - running locally (ie. with docker), or hosted with MongoDB Atlas
- uv - https://docs.astral.sh/uv/getting-started/installation/
/$ cp sample.env .envIf needed, update MONGODB_URI in .env file.
/$ cd frontend
/frontend$ npm installNote: 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/$ cd backend
/backend$ uv sync/$ cd backend
/backend$ uv run pre-commit installFirst commit after this can take a bit longer
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:latestCheck, if the docker container is running:
/$ docker container lsThe 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
- Follow the offical MongoDB Atlas Tutorial to create an account, setup a cluster, and access the connection string.
- 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.
/frontend$ npm run develop/backend$ uv run fastapi dev src/main.pyIt'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)To seed the database with initial data, run the following command from the /backend directory
/backend$ uv run -m src.scripts.seed_dataOptional -p argument will drop existing collections, and configure them again, before seeding.
/backend$ uv run -m src.scripts.seed_data -p/frontend$ npm run test:browserpytest gives multiple options for running all or part of the tests. How to invoke pytest.
Unit tests are using mocked db with very limited capabilities.
/backend$ uv run pytest -m "not integration"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 integrationRequires the same setup as integration tests.
/backend$ uv run pytest- Mark test(s) to run with additional marker, ie.
@pytest.mark.only. - Run only tests with the marker.
/backend$ uv run pytest -m only