Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/OluwagbeminiyiA/agro_pulse-API/llms.txt

Use this file to discover all available pages before exploring further.

AgroPulse is a Django REST Framework API for agricultural commerce. This guide walks you through cloning the repository, configuring your environment, running database migrations, and starting the development server locally.

Prerequisites

  • Python 3.12 or newer
  • PostgreSQL (running and accessible)
  • Poetry installed globally

Steps

1

Clone the repository and install dependencies

Clone the repository and use Poetry to install all Python dependencies defined in pyproject.toml.
git clone https://github.com/OluwagbeminiyiA/agro_pulse-API.git && cd agro_pulse-API && poetry install
2

Create your environment file

AgroPulse reads configuration from a .env file using python-decouple. Create a .env file in the project root and populate it with your Django, database, email, and Squad credentials.See Configure AgroPulse environment variables for a full list of required variables and a sample .env file.
3

Run database migrations

Apply all Django migrations to create the PostgreSQL schema.
poetry run python -m core_agropulse.manage migrate
4

Create a superuser (optional)

Create an admin account to access the Django admin interface at /admin/.
poetry run python -m core_agropulse.manage createsuperuser
5

Start the development server

Start the Django development server. The API will be available at http://localhost:8000.
poetry run python -m core_agropulse.manage runserver
The server runs on http://localhost:8000 by default. All API endpoints are under /api/.

Makefile shortcuts

The repository includes a Makefile with convenience targets. Run these from the project root:
CommandDescription
make run-serverStart the development server
make lintRun pre-commit hooks across all files
make migrationsGenerate new migration files (makemigrations)
make migrateApply pending migrations
make testRun the test suite

Running tests

Run the full test suite:
poetry run python -m core_agropulse.manage test
Run tests for a specific app module with verbose output:
poetry run python -m core_agropulse.manage test core_agropulse.payments.tests -v 2
poetry run python -m core_agropulse.manage test core_agropulse.subscriptions.tests -v 2

Build docs developers (and LLMs) love