Skip to content

mahmudhaji/malariya_project

Repository files navigation

PataMalaria - Full Stack SQL Setup Guide

This application is built with a professional full-stack architecture using Next.js 15, Prisma ORM, and SQL Persistence.

🚀 Local Machine Setup (PC)

Follow these steps to run the application with a persistent database on your local machine.

1. Prerequisites

  • Node.js (v18 or newer installed)
  • Git
  • SQL Database: Install PostgreSQL (Recommended) or MySQL.

2. Database Creation

  1. Open your SQL terminal (e.g., pgAdmin for Postgres or MySQL Workbench).
  2. Create a new empty database named patamalaria:
    CREATE DATABASE patamalaria;

3. Environment Configuration

  1. Open the .env file in the project root.
  2. Update the DATABASE_URL with your local credentials.
    • For MySQL users: Also change provider = "postgresql" to provider = "mysql" in prisma/schema.prisma.

4. Installation & Connection

Run these commands in your project folder terminal:

# Install all required packages
npm install

# Connect and push the schema to your local database
npx prisma db push

# Generate the internal Prisma client for the backend
npx prisma generate

5. Start the Application

npm run dev

The app will be running at http://localhost:9002.

📁 Project Architecture

  • Backend (API Layer): src/app/actions/ contains the Server Actions that handle all SQL queries.
  • Frontend (UI Layer): src/app/dashboard/ contains the React components and layouts.
  • Database Engine: prisma/schema.prisma defines the data structures.
  • AI Core: src/ai/ powered by Genkit for automated surveillance.

👥 Default User Accounts

Login with these credentials once the app is running:

Role Username Password
Admin admin_user password123
Doctor doctor_user password123
Officer officer_user password123
CHW chw_user password123

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages