ABSENS is a comprehensive platform developed to help locate and reunite missing individuals using advanced AI technology. The system leverages facial recognition, age progression technology, and a nationwide network of volunteers and law enforcement agencies to create a robust solution for finding missing persons.
By combining cutting-edge technology with a user-friendly interface, ABSENS aims to streamline the process of reporting, searching for, and identifying missing individuals across India.
- 🔍 AI-Powered Recognition: State-of-the-art facial recognition and age progression technology for accurate identification
- 🔔 Real-time Alerts: Instant notifications for potential matches and sightings across the country
- 💾 Centralized Database: Comprehensive repository of missing person reports with advanced search capabilities
- 👥 Volunteer Network: Nationwide network of verified volunteers and organizations working together
- 👮 Law Enforcement Integration: Secure connection with police and agencies across India
- 📱 Responsive Design: Fully responsive interface that works seamlessly on all devices
- 🌙 Dark Mode Support: Complete dark mode implementation for better accessibility and reduced eye strain
- 🔒 Secure Authentication: Robust user authentication and authorization system
- Framework: Next.js 14 (React)
- Language: TypeScript
- Styling: Tailwind CSS with custom UI components
- State Management: Redux Toolkit
- Authentication: JWT with secure token refresh
- API Server: Node.js with Express
- Database: MongoDB
- Authentication: JWT, bcrypt for password hashing
- Validation: Joi/Zod
- Image Processing: FastAPI
- Facial Recognition: DeepFace
- Embedding Models: Google's Embedding Model
- Vector Database: For efficient similarity search
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm (v9.0.0 or higher) or yarn (v1.22.0 or higher)
- MongoDB (v6.0 or higher)
- Python 3.9+ (for AI services)
- Clone the repository
git clone https://github.com/your-organization/absens.git
cd absens
- Set up the Frontend
# Navigate to the Frontend directory
cd Frontend
# Install dependencies
npm install
# or
yarn install
# Create a .env.local file with the following content
echo "NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
NEXT_PUBLIC_IMAGE_RECOGNITION_URL=http://localhost:8000" > .env.local
- Set up the Backend
# Navigate to the Backend directory
cd ../Backend
# Install dependencies
npm install
# or
yarn install
# Create a .env file with the following content
echo "PORT=5000
MONGODB_URI=mongodb://localhost:27017/absens
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=7d" > .env
- Set up the AI Service (if applicable)
# Navigate to the AI-Service directory
cd ../AI-Service
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
- Start the Frontend
cd Frontend
npm run dev
# or
yarn dev
- Start the Backend
cd Backend
npm run dev
# or
yarn dev
- Start the AI Service (if applicable)
cd AI-Service
python app.py
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- AI Service: http://localhost:8000
absens/
├── Frontend/ # Next.js frontend application
│ ├── app/ # Next.js app directory (pages and layouts)
│ ├── components/ # Reusable UI components
│ │ ├── ui/ # Base UI components
│ │ └── layout/ # Layout components
│ ├── lib/ # Utility functions and state management
│ │ ├── slices/ # Redux slices
│ │ └── store.ts # Redux store configuration
│ └── public/ # Static assets
│
├── Backend/ # Node.js backend application
│ ├── controllers/ # Request handlers
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ ├── middleware/ # Custom middleware
│ └── utils/ # Utility functions
│
└── AI-Service/ # Facial recognition service
├── models/ # ML models
├── api/ # FastAPI endpoints
└── utils/ # Utility functions
ABSENS implements a secure authentication system using JWT (JSON Web Tokens):
- User registers or logs in through the frontend
- Backend validates credentials and issues a JWT and refresh token
- Frontend stores the tokens securely
- JWT is included in the Authorization header for protected API requests
- When the JWT expires, the refresh token is used to obtain a new JWT
- Backend middleware validates the JWT for protected routes
POST /api/auth/register
- Register a new userPOST /api/auth/login
- Login and receive JWTPOST /api/auth/refresh
- Refresh JWT tokenPOST /api/auth/logout
- Invalidate tokens
POST /api/missing-persons
- Report a missing personGET /api/missing-persons
- Get all missing personsGET /api/missing-persons/:id
- Get a specific missing personPUT /api/missing-persons/:id
- Update a missing person reportDELETE /api/missing-persons/:id
- Delete a missing person report
POST /api/search
- Search for missing persons with optional image uploadGET /api/search/results/:id
- Get search results
# Run frontend tests
cd Frontend
npm test
# or
yarn test
# Run backend tests
cd ../Backend
npm test
# or
yarn test
A docker-compose.yml
file is provided for easy deployment:
# Build and run with Docker Compose
docker-compose up -d
cd Frontend
npm run build
npm start
cd Backend
npm run build
npm start
We welcome contributions to ABSENS! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please ensure your code follows our coding standards and includes appropriate tests.
graph TD
A[User] -->|Reports/Searches| B[Frontend]
B -->|API Requests| C[Backend]
C -->|Stores Data| D[(Database)]
C -->|Image Processing| E[AI Service]
E -->|Face Recognition| F[ML Models]
E -->|Similarity Search| G[(Vector DB)]
C -->|Notifications| H[Alert System]
H -->|Sends Alerts| I[Users/Agencies]
sequenceDiagram
participant User
participant Frontend
participant Backend
participant Database
participant AIService
User->>Frontend: Submit missing person report with photos
Frontend->>Backend: POST /api/missing-persons
Backend->>Database: Store report details
Backend->>AIService: Process uploaded images
AIService->>AIService: Extract facial features
AIService->>Database: Store feature vectors
AIService->>Backend: Return processing results
Backend->>Frontend: Confirm report submission
Frontend->>User: Display confirmation
sequenceDiagram
participant User
participant Frontend
participant Backend
participant Database
participant AIService
User->>Frontend: Upload photo for search
Frontend->>Backend: POST /api/search
Backend->>AIService: Process search image
AIService->>AIService: Extract facial features
AIService->>Database: Search for similar faces
Database->>AIService: Return potential matches
AIService->>Backend: Return search results
Backend->>Frontend: Display potential matches
Frontend->>User: Show search results
graph TD
A[Potential Match Found] -->|Triggers| B[Alert System]
B -->|Notifies| C[Law Enforcement]
B -->|Notifies| D[Reporting User]
B -->|Notifies| E[Nearby Volunteers]
C -->|Takes Action| F[Investigation]
D -->|Provides| G[Additional Information]
E -->|Assists with| H[Local Search]
F -->|Updates| I[Case Status]
I -->|Notifies| J[All Stakeholders]