Application URL: https://secure-password-manager-475618.uc.r.appspot.com/
- Git
- Python 3.11+
- nvm
- Node.js 22.12
- Install using nvm
nvm install 22.12 nvm use 22.12
- Install using nvm
- pnpm
npm install -g pnpm
- Clone repository locally
- Create a virtual environment to isolate project's dependencies from your global Python installation. This will also ensure all team members work with the same version of packages.
python3 -m venv venv- Activate virtual environment and install dependencies (as they might have changed)
source venv/bin/activate
pip install -r requirements.txt- Run Django server locally
source venv/bin/activate
pip install -r requirements.txt
export DJANGO_SETTINGS_MODULE=password_manager.settings.local
python manage.py migrate
python manage.py runserver- Run Front-end server locally in another terminal
cd frontend/web
nvm use
pnpm install
pnpm devNote: You do not need to run the front-end server separately using this method, and this method is a way to test that the application will work once it's deployed to the cloud.
- Activate virtual environment and install dependencies (as they might have changed)
source venv/bin/activate
pip install -r requirements.txt- Build the React Frontend, similar to prod
cd frontend/web
nvm use
pnpm install
pnpm run build
cd ../..- Set your environment with:
export DJANGO_SETTINGS_MODULE=password_manager.settings.local_deployment- Collect React Frontend and Django static files
python manage.py collectstatic --noinput- Run migrations and run the Django server with local SQLite instance
python manage.py migrate
python manage.py runserver- Create an account via the registration link in the /login page and complete MFA setup.
You'll need to save these details and use them to access the Vault application.
The project uses a multi-file settings structure:
password_manager/settings/base.py- Common settings shared across all environmentspassword_manager/settings/local.py- Local development settings (SQLite, DEBUG=True)password_manager/settings/deployment.py- Production settings (Cloud SQL, security enforced)password_manager/settings/test.py- CI test settings (PostgreSQL test container, extends deployment)
By default, the project uses deployment.py settings.
Update your config file by running
export DJANGO_SETTINGS_MODULE=password_manager.settings.local
This will:
- Use SQLite database instead of Cloud SQL
- Enable DEBUG mode
- Allow all CORS origins
- Use relaxed security settings
The deployment settings are used automatically when DJANGO_SETTINGS_MODULE is not set or when explicitly set to password_manager.settings.deployment.
For deployment, set the required environment variables in app.yaml or your CI/CD pipeline.
pnpm typecheckHelpful Resource: https://docs.djangoproject.com/en/5.2/topics/testing/advanced/#integration-with-coverage-py
- While in the virtual environment, install Coverage.py with
pip install coverage- This was not included in
requirements.txtas this is a development tool and not a run time requirement.
- This was not included in
- You can run test coverage for just one application (in this example,
generator) with:
python -m coverage run --source=generator manage.py test generator
coverage report
coverage html- In your terminal, you can click on the
index.htmlcreated to see a nice code coverage dashboard and click on file names to see which lines are and aren't covered.