A real-time crime reporting platform built with Next.js that enables communities to report and verify crimes while ensuring authenticity through AI-powered verification and community engagement.
-
User Authentication
- Email & Phone verification
- OTP-based verification
- Role-based access control (Admin/Verified/Unverified users)
-
Crime Reporting
- Image/video upload with AI-generated descriptions
- Location-based reporting (Division/District)
- Community verification system
- Watermarking for uploaded content
- Anonymous reporting option
-
Community Interaction
- Upvote/Downvote system
- Comments with mandatory proof
- Real-time notifications
- Verification badges for trusted reports
-
Advanced Features
- Crime heatmap visualization
- AI-powered fake report detection
- Emergency contact integration
- Image compression and optimization
- Node.js (v18 or higher)
- MongoDB
- FTP Server (for file storage)
- Google Maps API Key
- Hugging Face API Token
- SMS Gateway API credentials
- Clone the repository:
git clone https://github.com/hasin023/shahajjo.git
cd shahajjo
- Create a
.env.local
file in the root directory with the following variables:
MONGODB_URI=your_mongodb_uri
DBNAME=your_db_name
JWT_SECRET_KEY=your_jwt_secret_key
GROQ_API_KEY=your_groq_api_key
SMS_API_KEY=your_sms_api_key
SMS_SENDERID=your_sms_sender_id
FTP_IP=your_ftp_server_ip
FTP_USER=your_ftp_username
FTP_PASS=your_ftp_password
NEXT_PUBLIC_GOOGLE_MAP_API=your_google_maps_api_key
NEXT_PUBLIC_HF_ACCESS_TOKEN=your_huggingface_token
NODE_ENV=development
- Install dependencies:
npm install
- Start the FTP service:
npm run ftp
- Start the development server:
npm run dev
The application will be available at http://localhost:3000
📦 crime-reporting-platform
├── 📂 src/
│ ├── 📂 app/ # Next.js 13+ app directory
│ ├── 📂 components/ # Reusable UI components
│ ├── 📂 db/ # Database configuration
│ ├── 📂 hooks/ # Custom React hooks
│ ├── 📂 libs/ # Utility functions and types
│ ├── 📂 services/ # Business logic and API services
│ └── 📂 stores/ # State management
- Frontend: Next.js, React, Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB
- File Storage: FTP Server
- Authentication: JWT + OTP
- Maps: Google Maps API
- AI Integration: Hugging Face API
- Real-time Features: WebSocket/Server-Sent Events
npm run dev
: Start development servernpm run ftp
: Start FTP servicenpm run build
: Build production bundlenpm start
: Start production servernpm run lint
: Run ESLintnpm run test
: Run tests (if configured)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for the Hackathon event on February 12, 2025
- Uses various open-source libraries and APIs
- Community-driven crime reporting initiative
- Ensure all API keys and credentials are properly secured
- The FTP service must be running before starting the development server
- Configure proper security measures before deploying to production
- Regular backups of the database are recommended