Backend for Child Exploitation Reporting Application
Table of Contents
The DAEM-Backend is the server-side component of a Child Exploitation Reporting Application. It provides a robust API for managing public and anonymous case reports, user authentication, and file attachments. The application aims to combat child abuse by offering a platform for reporting incidents, both publicly and anonymously, while maintaining user privacy and data security.
- User authentication and authorization
- Public case reporting and management
- Anonymous case reporting with unique key generation
- File attachment handling using Supabase
- Location-based case querying and filtering
- Internationalization support
- Custom error handling and logging
- Robust testing setup using Japa
└── DAEM-backend/
├── .github/workflows/
├── bin/
├── eslint-custom-rules/
├── i18n/
│ ├── en/
│ └── es/
├── src/
│ ├── application/
│ │ ├── anonymous-case/
│ │ ├── anonymous-key/
│ │ ├── attachment/
│ │ ├── auth/
│ │ ├── public-case/
│ │ ├── stale-content/
│ │ └── user/
│ ├── db/
│ ├── middleware/
│ └── utils/
└── tests/
├── api/
└── utils/
src.application.anonymous-cases
File | Summary |
---|---|
anonymous-case.model.js | Defines the MongoDB schema for anonymous cases, including location data and attachment references. |
anonymous-case.controllers.js | Implements controllers for creating, retrieving, and managing anonymous cases. |
anonymous-case.utils.js | Provides utility functions for anonymous case operations, such as key generation and case querying. |
anonymous-case.routes.js | Defines API routes for anonymous case-related operations. |
anonymous-case.errors.js | Contains custom error classes for handling anonymous case-specific errors. |
src.application.public-case
File | Summary |
---|---|
public-case.model.js | Defines the MongoDB schema for public cases, including user references and location data. |
public-case.controllers.js | Implements controllers for creating, retrieving, and managing public cases. |
public-case.utils.js | Provides utility functions for public case operations, such as filtering and querying. |
public-case.routes.js | Defines API routes for public case-related operations. |
public-case.errors.js | Contains custom error classes for handling public case-specific errors. |
src.application.auth
File | Summary |
---|---|
auth.controllers.js | Implements authentication controllers for user registration and login. |
auth.routes.js | Defines API routes for authentication-related operations. |
auth.errors.js | Contains custom error classes for handling authentication-specific errors. |
src.application.attachment
File | Summary |
---|---|
attachment.model.js | Defines the MongoDB schema for file attachments. |
attachment.controllers.js | Implements controllers for handling file uploads and retrievals using Supabase. |
attachment.routes.js | Defines API routes for attachment-related operations. |
attachment.errors.js | Contains custom error classes for handling attachment-specific errors. |
- Clone the DAEM-backend repository:
git clone https://github.com/kinal-team-1/DAEM-backend
- Change to the project directory:
cd DAEM-backend
- Install the dependencies:
npm install
- Pull the DB mongo replica set enabled image for local development, we recommend using
make
for this:
make
-
Set up environment variables:
- You can use
.env.example
or create.env
and set up your own supabase credentials.
- You can use
-
Start the server:
npm run dev
Run the test suite using the command below:
npm test
- Implement basic CRUD operations for public and anonymous cases
- Set up authentication system
- Integrate file upload functionality with Supabase
- Implement location-based case querying
- Add internationalization support
- Develop case contribution endpoints
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
this project was made by students of KINAL, Guatemala.