/RJPOLICE_HACK_383_AlgoPirates_1

This repository is made only for Rajasthan Police Hackathon 1.0, developed by Team: Algo Pirates

Primary LanguageJavaScript

Note:

  • Open deployed link of this web app https://lawlens.vercel.app/
  • Sign up with your credentials
  • For now, the user can only log in as an admin (so kindly select admin from dropdown in sign in page)

Law Lens

Law Lens is an Online Platform that minimizes the gap between Police and Citizens by allowing citizens to

  • File a FIR online
  • Tracking of your filed FIR
  • Connecting with police officials in a single click by booking advance appointments
  • During an emergency, find the nearest police station/policeman around you
  • It allows citizens to provide feedback of a particular police station

Frontend

Screenshot 2023-12-28 172200

Overview

Screenshot 2023-12-30 200458

The front end of Law Lens is built using modern web technologies to provide an intuitive and user-friendly interface. It offers document search, case management, and interactive tools to enhance user-friendliness and transparency.

Technologies Used

  • React.js: A JavaScript library for building user interfaces.
  • React Router: A routing library for React applications, enabling navigation between different components.
  • BootStrap: A framework for styling responsive and consistent user interfaces.

Screenshot 2023-12-30 200917

Getting Started

  1. Clone the repository:
git clone https://github.com/your-username/RJPOLICE_HACK_383_AlgoPirates_1.git
cd LawLens
  1. Install dependencies:
npm install
  1. Start the development server:
npm start
  1. Open your browser and navigate to http://localhost:3000 to view the Law Lens frontend.

Features

  • Document Search: Efficiently search and retrieve legal documents based on keywords and filters.
  • Case Management: Organize and manage legal cases with detailed information and document attachments.
  • Interactive Tools: Auto Chatbot and Bulk SMS Tool.

Contribution Guidelines

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix: git checkout -b feature/new-feature.
  3. Make your changes and test thoroughly.
  4. Commit your changes: git commit -m "Add new feature".
  5. Push to the branch: git push origin feature/new-feature.
  6. Submit a pull request to the main repository.

Backend

WhatsApp Image 2023-12-28 at 17 27 47_4aa42cbe

Overview

The backend of Law Lens serves as the core engine handling data storage, retrieval, and business logic. It provides a RESTful API that the front end communicates with to perform document retrieval, case management, and user authentication operations.

Technologies Used

  • Node.js: A JavaScript runtime for building scalable server-side applications.
  • Express.js: A web application framework for Node.js, simplifying the creation of robust APIs.
  • MongoDB: A NoSQL database for storing and retrieving legal documents and case information.
  • Mongoose: An ODM (Object Data Modeling) library for MongoDB and Node.js.
  • JWT (JSON Web Tokens): Used for secure authentication and authorization.

Getting Started

  1. Change directory:
cd Lawlens-Backend
  1. Install dependencies:
npm install express
npm install mongoose
npm install -D nodemon
npm install bcrypt
npm install express-validator
npm install jsonwebtoken
  1. Set up environment variables by creating a .env file:
PORT=3001
MONGODB_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
  1. Start the server:
npm start
  1. The backend server will be running at http://localhost:3001.

API Endpoints

  • POST /api/auth/login:
    {
    "Email" : "user@gmail.com",
    "password" : "xxxxxxxx"
    }
    
  • GET /api/auth/createuser:
    {
    "Username" : "Name of user",
    "Email" : "user@gmail.com",
    "password" : "xxxxxxxx",
    "Adhar Number" : "XXXX1131331",
    "mobile Number" : "73787786xxx"
    }
    

Contribution Guidelines

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix: git checkout -b feature/new-feature.
  3. Make your changes and test thoroughly.
  4. Commit your changes: git commit -m "Add new feature".
  5. Push to the branch: git push origin feature/new-feature.
  6. Submit a pull request to the main repository.