Quick Start Guide
Get Mantis running on your local machine in minutes. This guide covers the essential steps to set up a development environment.Prerequisites
Before you begin, ensure you have the following installed:Python 3.x
Python 3.8 or higher required for Django 4.2
PostgreSQL
PostgreSQL 12 or higher for database storage
Node.js
Node.js 20.19.0+ or 22.12.0+ for frontend development
Git
For cloning the repository
Quick Setup
Configure Database
Create a PostgreSQL database for Mantis:Configure your database connection in
app/src/common/secrets.py:Set Up Backend
Navigate to the Django project directory and run migrations:
The
sowseed command populates the database with initial data required for system operation.Create Superuser
Create an administrative user to access the Django admin:Follow the prompts to enter:
- Email address (used as username)
- Password
- Additional user information
Set Up Frontend
Install and build the Vue.js frontend:The frontend will be available at
http://localhost:5173For production builds, use
npm run build which will compile and copy assets to the Django static directories.Creating Your First Project
Once Mantis is running, you can create your first project through either the Django admin interface or the API.Via Django Admin
Access Admin Interface
Navigate to
http://localhost:8000/admin and log in with your superuser credentials.Create a Partner
Before creating a project, you need a partner (client):
- Go to Projects → Partners
- Click Add Partner
- Fill in the partner details (name, contact info, etc.)
- Click Save
Create a Project
Now create your first project:
- Go to Projects → Projects
- Click Add Project
- Select the partner you just created
- Fill in project details:
- Location (campamento)
- Cardinal point
- Contact name and phone
- Start date
- Click Save
Via API
You can also create projects programmatically using the REST API:Verify Your Installation
Confirm everything is working correctly:Check Django Admin
Check Django Admin
- Navigate to
http://localhost:8000/admin - Log in successfully
- View the Grappelli-enhanced interface
- Access Projects, Equipment, and Accounts sections
Check API Endpoints
Check API Endpoints
Test API availability:You should receive a JSON response with available endpoints.
Check Frontend
Check Frontend
- Navigate to
http://localhost:5173 - Verify the Vue.js application loads
- Check that assets load correctly
- Test navigation between pages
Check Database
Check Database
Verify database connectivity:This should open a PostgreSQL prompt. You can run:
Common Issues
Database Connection Error
Database Connection Error
If you see “could not connect to server”:
- Verify PostgreSQL is running:
sudo systemctl status postgresql - Check database credentials in
common/secrets.py - Ensure the database exists:
psql -U postgres -l - Verify host and port settings
Migration Errors
Migration Errors
If migrations fail:
- Reset migrations (development only):
- Check for circular dependencies in models
- Ensure all apps are listed in
INSTALLED_APPS
Frontend Build Errors
Frontend Build Errors
If
npm run build fails:- Clear node_modules:
rm -rf node_modules package-lock.json - Reinstall:
npm install - Check Node.js version:
node --version(should be 20.19.0+) - Clear Vite cache:
rm -rf node_modules/.vite
Static Files Not Loading
Static Files Not Loading
If static files don’t appear:
- Collect static files:
- Check
STATIC_ROOTandSTATIC_URLin settings - Verify
STATICFILES_DIRSconfiguration
Next Steps
Now that Mantis is running, explore these topics:Installation Guide
Learn about production deployment and advanced configuration.
API Reference
Explore the complete REST API documentation.
Project Features
Learn about project management capabilities.
User Guides
Deep dive into project workflows and resource allocation.
Need Help?
For detailed installation instructions, including production deployment, environment configuration, and troubleshooting, see the Installation Guide.