Logo Lanfrica

Isaac-1-lang/Ura-Backend

Domaine:

socioeconomic

Type de record:

software
Créateur:
Isa
Hôte:
an NGO Beneficiary & Aid Distribution Management System, mapped to Rwanda's administrative structure (Province → District → Sector → Cell). # URA (NGO Management Platform) URA is a modern, modular monolith web application designed for NGO operations, including managing organizations, projects, beneficiaries, distributions, and analytics. Built by **Genzura**. This project focuses on providing a clean, production-ready codebase without bundled infrastructure/DevOps tooling. ## Tech Stack - **Backend**: NestJS, PostgreSQL (Prisma ORM), Redis, JWT Auth. - **Frontend**: Next.js 15 (App Router), React, Tailwind CSS, Lucide Icons. ## Prerequisites - Node.js (v18+) - PostgreSQL Database - Redis Server ## Setup Instructions ### 1. Database Setup Ensure PostgreSQL is running. Create a database for URA. ```bash # Set your environment variables in backend/.env DATABASE_URL="postgresql://postgres:postgres@localhost:5432/ura?schema=public" JWT_SECRET="your-super-secret-key" JWT_REFRESH_SECRET="your-super-secret-refresh-key" REDIS_HOST="localhost" REDIS_PORT="6379" ``` ### 2. Backend Initialization Navigate to the backend directory, install dependencies, and run Prisma migrations. ```bash cd backend npm install # Run database migrations npx prisma migrate dev --name init # Start the development server npm run start:dev ``` The API will be available at `localhost`. Swagger documentation is available at `localhost`. ### 3. Frontend Initialization Navigate to the frontend directory, install dependencies, and start the Next.js server. ```bash cd frontend npm install # Create a .env.local file echo "NEXT_PUBLIC_API_URL=localhost" > .env.local # Start the development server npm run dev ``` The frontend will be available at `localhost` (or 3001 depending on what port Next.js chooses). ## Project Structure This is a **Modular Monolith** architecture. The backend contains distinct domain modules: - `AuthModule`: Authentication (JWT) and Authorization (RBAC). - `UsersModule`: Admin, Project Managers, and Field Agents. - `OrganizationsModule`: NGO …