Prerequisites
Before you begin, ensure you have the following installed:- Go 1.24.1 or higher
- Node.js 16+ and Yarn 1.22+
- PostgreSQL 12+
- Make (for build automation)
- Git
The backend is written in Go and the frontend uses Vue.js with Buefy for the UI components.
Clone the Repository
Backend Setup
Install Go dependencies
Go modules are used for dependency management. Dependencies will be automatically downloaded when building:
Build the backend
Build the listmonk binary:This creates the
listmonk binary in the current directory.Frontend Setup
The frontend uses Vite as the build tool and ESLint for code linting. The linter runs automatically before builds.
Database Setup
Running in Development Mode
Backend Development
Run the backend in development mode with live frontend assets:frontend/dist directory.
Frontend Development
For active frontend development with hot reload:When running the frontend dev server, configure it to proxy API requests to the backend server at
http://localhost:9000.Building for Production
Complete Build with Embedded Assets
Build everything and embed all assets into a single binary:- Installs
stuffbin(asset embedding tool) - Builds the backend binary
- Builds the frontend
- Embeds all static assets, templates, and frontend into the binary
Individual Build Targets
Project Structure
Testing
Run Go tests:Docker Development Environment
Using Docker Compose for Development
Frontend Development Notes
Global Vue Plugins
Infrontend/main.js, the following are attached globally:
- Buefy - UI component framework
- vue-i18n - Internationalization
- $api - API calls from
api/index.js - $utils - Utility functions from
util.js
this.$api and this.$utils.
State Management
The project uses Vuex for global state management. API responses are stored centrally as “models” defined inconstants.js. Check store/index.js for state definitions.
Icon Set
listmonk uses a custom subset of Material Design Icons via Fontello. The icon configuration is infrontend/fontello/config.json.
JSON field names in API responses are automatically camel-cased in the frontend. When sending data to the backend, manually convert to snake_case.
Development Workflow
- Make changes to backend (Go) or frontend (Vue) code
- Test locally using
make runandmake run-frontend - Run tests with
make test - Build with
make distto verify production build - Commit changes following the contribution guidelines
Troubleshooting
Build Issues
- Ensure all prerequisites are installed and up to date
- Clear build artifacts:
rm -rf listmonk frontend/dist - Reinstall dependencies:
go mod download && cd frontend && yarn install
Database Connection Issues
- Verify PostgreSQL is running:
pg_isready - Check
config.tomldatabase credentials - Ensure the database exists:
psql -l | grep listmonk
Frontend Dev Server Issues
- Clear node modules:
cd frontend && rm -rf node_modules && yarn install - Check for port conflicts (default: 3000)
- Verify backend is running on port 9000
Next Steps
- Review the Contributing Guide for code standards
- Learn about Internationalization to add translations
- Explore the codebase and start contributing!