A service-based platform for outsourcing and monetizing 3D printing
Run make all
, then execute the compiled voxeti
binary.
You can specify the database to connect to with a CLI flag.
Note
This won't work until you have the necessary languages and tools installed on your system.
First, understand the tech stack:
- The backend is written in Go and utilizes the Echo web framework for API routes
- The frontend is React with TypeScript and uses Vite as a build tool and TanStack Router for defining UI routes
- The database is MongoDB, a document/NoSQL database that can be deployed locally (useful for testing!) or in the cloud with MongoDB Atlas (a better choice for production)
Before we can compile and run our application, we need to install several languages, package managers, and various tools. The installation process can vary, so follow the provided installation instructions for each item below
- Go, our primary backend language
- Afterwards, install all go dependencies with the command
go get .
in the root directory. This needs to be re-run if dependencies change
- Afterwards, install all go dependencies with the command
- wgo, a live reload tool for Go (which does not support live reloading by default)
- golangci-lint, a powerful Go linter (required for development)
- pnpm, our frontend package manager
- Afterwards, install all pnpm dependencies with the command
pnpm --dir frontend install
in the root directory. This needs to be re-run if dependencies change
- Afterwards, install all pnpm dependencies with the command
- commitizen, a nice utility for formatting git commits (required for development). Run
cz commit
instead ofgit commit
to use it once installed. - pre-commit, a tool for running shared Git hooks on pre-commit (required for development)
- Afterwards, install all Git hooks with the command
pre-commit install --hook-type commit-msg --hook-type pre-push
in the root directory. This needs to be re-run if hooks change
- Afterwards, install all Git hooks with the command
If everything was successful, you can now compile and run the project!
The project can be run in either development mode or production mode. The key difference is that development mode reloads on changes to source code, while production mode is compiled as a static binary. In development mode, Vite is in charge of running the frontend on its own server and Echo redirects to it. In production mode, Vite generates a static frontend that Echo embeds and serves in its file structure.
As a developer, you will primarily run the server in development mode while you work. To start the server in development mode, run make dev
.
To compile the binary in production mode, run make all
. This will generate an executable voxeti
binary.
Consider investigating these scripts if you want to know how they work in greater detail.