Skip to content

JiaAneja/jan_suraksha

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

222 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿ›ก๏ธ Jan Suraksha - Online Crime Reporting Portal

Jan Suraksha Banner Language Database Deployment Open Source SWOC'26 GitHub Pull Requests Stars License

๐Ÿ“š Table of Contents


๐Ÿ“– About The Project

Jan Suraksha is a digital initiative aimed at bridging the gap between citizens and law enforcement. It is an online crime reporting portal designed to make the process of reporting incidents safer, faster, and more transparent.

In many scenarios, citizens hesitate to report crimes due to fear or procedural complexities. Jan Suraksha aims to solve this by providing a user-friendly platform where complaints can be lodged securely.

๐ŸŒŸ Why this project?

  • Safety: Encourages citizens to report crimes without fear.
  • Transparency: Real-time tracking of complaint status.
  • Social Impact: Directly contributes to a safer society using technology.

๐Ÿ”— Live Demo

Check out the live project here:
๐Ÿ‘‰ https://jansuraksha.infinityfreeapp.com/


๐Ÿš€ Tech Stack

This project is built using the following technologies:

  • Frontend: HTML5, CSS3, JavaScript, Bootstrap (Responsive Design)
  • Backend: PHP (Core)
  • Database: MySQL
  • Server Environment: XAMPP / WAMP (Apache Server)
  • DevOps: GitHub Actions (Automated Deployment)

๐Ÿ“‚ Project Architecture

Understanding the codebase is easy! Here is how our files are organized:

Jan-Suraksha/
โ”œโ”€โ”€ admin/               # Admin dashboard & status management
โ”œโ”€โ”€ assets/              # UI Assets: CSS, JS, and Banner Images
โ”œโ”€โ”€ includes/            # Reusable PHP modules (Header/Footer/Nav)
โ”œโ”€โ”€ config.php           # Database connection & Environment config
โ”œโ”€โ”€ schema.sql           # Database structure for SQL import
โ”œโ”€โ”€ index.php            # Main Landing Page
โ””โ”€โ”€ login.php            # User authentication logic

System Architecture

To help contributors understand the PHP-MySQL request lifecycle, here is the high-level architecture:

graph TD
    User((Citizen)) -- Reports Crime --> Index[index.php / Landing]
    Index --> Auth{login.php}
    Auth --> Portal[Complaint Form]
    Portal --> DB[(MySQL Database)]
    
    subgraph Administration
        Admin((Police Admin)) -- Manage --> Dashboard[admin/ Dashboard]
        Dashboard --> Status[Update Complaint Status]
        Status --> DB
    end

    subgraph Logic_Layer
        DB --> Config[config.php]
        Config --> Includes[includes/ Header-Footer]
    end

    style Administration fill:#f9d5e5,stroke:#333
    style Logic_Layer fill:#eeeeee,stroke:#333
Loading

โœจ Key Capabilities

Feature Description Status
Citizen Reporting Secure form to report incidents (Theft, Cybercrime, etc.) โœ… Completed
Real-time Tracking Check status updates from law enforcement in real-time โœ… Completed
Admin Dashboard Exclusive panel for police to manage cases โœ… Completed
Multilingual Support Support for regional language reporting ๐Ÿ› ๏ธ In Progress
Mobile Responsive Fully functional on smartphones and tablets โœ… Completed

๐Ÿ“ธ Screenshots

Home Page Complaint Form
Screenshot 2025-12-07 195411 Screenshot 2025-12-07 195453
image image
image image

Warning

Important: Admin Credentials > For testing the administrative side, use:
Username: admin | Password: admin

๐Ÿ› ๏ธ Getting Started (Installation)

Follow these steps to set up the project locally on your machine.

Prerequisites

You need a local server environment to run PHP and MySQL.

  • XAMPP (Recommended for Windows/Linux/Mac)
  • OR WAMP (For Windows)
  • A Code Editor (VS Code recommended)

Step-by-Step Installation

  1. Install XAMPP: Download and install XAMPP. Start the Apache and MySQL modules from the XAMPP Control Panel.
  2. Fork & Clone the Repository:
    • Navigate to your XAMPP installation folder (usually C:\xampp\htdocs).
    • Open your terminal/git bash in the htdocs folder.
    • Clone the repo:
    git clone [https://github.com/your-username/jan_suraksha.git]
    
  3. Database Configuration:
    • Open your browser and go to http://localhost/phpmyadmin.
    • Create a new database named jan_suraksha (Make sure this name matches your code).
    • Click on the Import tab.
    • Choose the schema.sql file provided in this repository and click Go.
  4. Connect Database:
    • Go to the project folder -> Open the config.php file.
    • Ensure the credentials match your local setup (Default XAMPP user is root with no password).
    $db_host = 'localhost';
    $db_user = 'root';
    $db_pass = ''; 
    $db_name = 'jan_suraksha';
    

Caution

Security Note: Never commit your local config.php if it contains sensitive credentials. This file is ignored by Git in production to prevent data leaks.

  1. Run the Project:
    • Open your browser.
    • Go to: http://localhost/jan_suraksha/jan_suraksha

Additional Notes (using Docker):

In case you're you want to use docker to run mysql instance.

    docker-compose up db -d

Update values in the config.php file.

    $db_host = '127.0.0.1';
    $db_user = 'root';
    $db_pass = 'root';
    $db_name = 'jan_suraksha';

๐Ÿค Contribution Guidelines

We welcome contributions from everyone!

How to Contribute?

  1. Find an Issue: Look for issues tagged with good first issue, bug, or enhancement.
  2. Assign Yourself: Comment on the issue asking to be assigned. Do not start working until assigned.
  3. Fork the Repo: Click the "Fork" button on the top right.
  4. Create a Branch:
    git checkout -b feature-name
    
  5. Make Changes & Commit:
    • Keep code clean and commented.
    git commit -m "Fixed bug in login page"
    
  6. Push Changes:
    git push origin feature-name
    
  7. Create a Pull Request (PR): Go to the original repository and click "Compare & pull request".

โš ๏ธ IMPORTANT: Do NOT change the config.php file in your PR unless necessary for local testing. Our CI/CD pipeline handles the live server connection automatically.


๐Ÿง‘โ€๐Ÿ’ป Contributors

A huge thank you to all the amazing people who have contributed to Jan Suraksha!

Want to contribute? Follow our Contribution Guidelines โ€” all PRs welcome! ๐Ÿš€


๐Ÿ›ก๏ธ Project Admin


๐Ÿ“„ License

This project is licensed under the MIT License.


Thanks for visiting Jan Suraksha! ๐Ÿ‡ฎ๐Ÿ‡ณ

Making society safer, one line of code at a time.

About

jan surksha crime portal

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 59.1%
  • TypeScript 29.1%
  • JavaScript 7.2%
  • CSS 3.2%
  • HTML 1.2%
  • Blade 0.2%