Installation Guide#
This document provides step-by-step instructions for setting up the DLP3D Web Backend development environment on different operating systems.
Table of Contents#
Linux Environment Setup#
Linux Prerequisites#
Before starting, ensure you have the following system requirements:
Ubuntu 20.04 or compatible Linux distribution
Internet connection for downloading packages
Linux Step 1: Install Protocol Buffers Compiler#
Download and install protoc for protocol buffer compilation:
# Create protoc directory
mkdir -p protoc
cd protoc
# Download protoc
curl -LjO https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-linux-x86_64.zip
# Extract and set permissions
unzip protoc-31.1-linux-x86_64.zip
rm -f protoc-31.1-linux-x86_64.zip
chmod +x bin/protoc
# Verify installation
bin/protoc --version
# Go back to the root directory
cd ..
Linux Step 2: Set Up Python#
You need Python 3.10 or higher to run this project. This document provides one method using conda for Python installation as a reference.
Install Python using Miniconda:
# Download Miniconda installer
wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# Install Miniconda
bash Miniconda3-latest-Linux-x86_64.sh
# Clean up installer
rm -f Miniconda3-latest-Linux-x86_64.sh
# Configure conda channels
conda config --add channels conda-forge
conda tos accept
# Create web environment with Python 3.10
conda create -n web python=3.10 -y
# Activate the environment
conda activate web
Linux Step 3: Install the Project#
Install the web backend package:
# Ensure you're in the project root directory
cd /path/to/web_backend
# Activate conda environment
conda activate web
# Install the package
pip install .
Linux Step 4: Verify Installation#
Test that everything is working correctly:
# Activate the environment
conda activate web
# Check if dlp3d_web_backend.service can be imported
python -c "import dlp3d_web_backend.service; print('dlp3d_web_backend.service imported successfully')"
# Check if the main application runs
python main.py --help
Linux Environment Activation#
To work with the web backend project, always activate the conda environment first:
# Activate the environment
conda activate web
# Your terminal prompt should now show (web)
# You can now run Python scripts and use the dlp3d_web_backend package
Windows Environment Setup#
Windows Prerequisites#
Before starting, ensure you have the following system requirements:
Windows 10/11 or compatible Windows distribution
Internet connection for downloading packages
Windows Step 1: Install Protocol Buffers Compiler#
Download and install protoc for protocol buffer compilation:
Download protoc:
Download the Windows version:
protoc-31.1-win64.zip
Extract the files:
Create a
protocfolder in your project root directoryExtract the downloaded
protoc-31.1-win64.zipfile into theprotocfolderEnsure the executable file is located at:
protoc\bin\protoc.exe
Verify installation:
# Open Command Prompt in your project directory protoc\bin\protoc.exe --version
Windows Step 2: Set Up Python#
You need Python 3.10 or higher to run this project. This document provides one method using conda for Python installation as a reference.
Install Python using Miniconda:
Download and Install Miniconda:
Download the Windows installer from the Anaconda website
Follow the official installation instructions to install Miniconda
Important: During installation, make sure to check “Add Miniconda3 to my PATH environment variable” or add the Miniconda3/Scripts directory to the PATH environment variable manually to enable conda commands from any terminal
Create and Activate Environment:
# Create web environment with Python 3.10 conda create -n web python=3.10 -y # Activate the environment conda activate web
Windows Step 3: Install the Project#
Install the web backend package:
# Ensure you're in the project root directory
cd /path/to/web_backend
# Activate conda environment
conda activate web
# Temporarily add protoc to PATH for this session
set PATH=%PATH%;%CD%\protoc\bin
# Install the package
pip install .
Windows Step 4: Verify Installation#
Test that everything is working correctly:
# Activate the environment
conda activate web
# Check if dlp3d_web_backend.service can be imported
python -c "import dlp3d_web_backend.service; print('dlp3d_web_backend.service imported successfully')"
# Check if the main application runs
python main.py --help
Windows Environment Activation#
To work with the web backend project, always activate the conda environment first:
# Activate the environment
conda activate web
# Your terminal prompt should now show (web)
# You can now run Python scripts and use the dlp3d_web_backend package
MongoDB Installation#
The DLP3D Web Backend service depends on MongoDB for data storage and management. You need to install and configure MongoDB before running the backend service.
Prerequisites#
MongoDB Community Edition (recommended for development)
MongoDB server must be running and accessible on your system
Installation Instructions#
Please follow the official MongoDB installation guide for your operating system:
📖 MongoDB Community Edition Installation Guide
The official guide provides detailed installation instructions for:
Linux: Ubuntu, RHEL/CentOS, Debian, Amazon Linux, and other distributions
Windows: Windows 10/11 and Windows Server
macOS: Intel and Apple Silicon (ARM64) architectures
Post-Installation Setup#
After installing MongoDB, ensure the following:
Start MongoDB Service:
Linux/macOS:
sudo systemctl start mongodorbrew services start mongodb-communityWindows: MongoDB should start automatically as a Windows service
Verify MongoDB is Running:
# Connect to MongoDB shell mongosh # Or using legacy mongo command mongo
Configure MongoDB for DLP3D Web Backend:
The backend service will automatically create the necessary database and user on first run
Ensure MongoDB is accessible on the default port (27017) or configure accordingly in your environment variables
Important Notes#
Data Directory: MongoDB will create its data directory automatically. Ensure sufficient disk space is available
Firewall: Make sure MongoDB port (default 27017) is accessible if running on a remote server