This project uses Nix, a package and system management tool, to ensure declarative, reproducible, and reliable development environments.
Install Nix Follow the instructions on Nix's website to install Nix on your system. To verify the installation, run:
nix --version
Clone the Repository Clone the project to your local machine in your preferred directory:
git clone https://github.com/nodu/teamster.git
Note: If
git
is not installed, you can install it via Nix with:nix-env -iA nixpkgs.git
Set Up direnv
for Automatic Environment Management
If you haven't already installed direnv
, you can install it globally via Nix:
nix-env -iA nixpkgs.direnv
Follow the instructions in direnv's documentation to hook direnv
into your shell. Restart your shell after setting it up.
Then, allow direnv
to load the environment for this project:
cd ...path/to/project...
direnv allow .
Tip: If you prefer not to use
direnv
, you can manually enter the Nix development environment by runningnix develop
in the project directory whenever you need the environment.
Initialize the Project Once you're inside the Nix development shell, initialize the basic Django SQLite database, apply database migrations, and install the UI dependencies:
make
Note: Only machine-level dependencies and backend (Django) packages are managed via Nix. Frontend dependencies (UI) are managed via Vite.
This project provides a Makefile
that contains common commands for setting up and running both the API (Django REST Framework) and the UI (Vite/TypeScript/React.js). You can use it as actionable documentation.
To develop with hot reloading, start the Django API server and the Vite UI server in separate terminals:
Django API server:
make serve-api
Vite UI server:
make serve-ui-dev
Note: If you modify the backend models (Django's data model), remember to run:
make make-migrations
— to create migrationsmake migrate
— to apply the migrations to your local database
Run unit tests for the project with the following commands:
Django tests:
make test-api
UI tests:
make test-ui
Happy coding! 🎉