A robust cybersecurity operations management application built using Django (backend) and React.js (frontend) with Redux for state management. The app features role-based authentication and authorization with three distinct roles: Admin, Tester, and User.
-
🔐 Role-Based Authentication and Authorization:
- Admin: Access to all features and user management.
- Tester: Limited access to perform assigned tasks.
- User: Basic access to use the application.
-
🧑💻 Technologies:
- Backend: Django, Djoser, JWT
- Frontend: React.js + Vite, Redux, React Router
- Database: SQLite (development)
-
📧 Email Integration:
- Account activation and password reset via Mailtrap.io.
-
⚙️ API Testing:
- All backend APIs tested with Postman.
cybersintel/
│
├── backend/
│ ├── accounts/
│ │ ├── migrations/
│ │ ├── __init__.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── views.py
│ │ ├── permissions.py
│ │ └── apps.py
│ ├── manage.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── navigation/
│ │ │ │ └── Nav.jsx
│ │ ├── features/
│ │ │ └── auth/
│ │ │ └── authSlice.js
│ │ ├── pages/
│ │ │ ├── ActivatePage.jsx
│ │ │ ├── Dashboard.jsx
│ │ │ ├── HomePage.jsx
│ │ │ ├── LoginPage.jsx
│ │ │ ├── NotFoundPage.jsx
│ │ │ ├── RegisterPage.jsx
│ │ │ ├── ResetPasswordPage.jsx
│ │ │ └── ResetPasswordPageConfirm.jsx
│ │ ├── App.jsx
│ │ └── store.js
│ ├── public/
│ ├── package.json
│ ├── vite.config.js
│ └── index.html
Follow these steps to set up the project locally:
-
Clone the Repository:
git clone https://github.com/arssite/cybersintel.git cd cybersintel/backend
-
Create a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Run Migrations:
python manage.py makemigrations python manage.py migrate
-
Create a Superuser:
python manage.py createsuperuser
-
Run the Development Server:
python manage.py runserver
-
Navigate to the Frontend Directory:
cd ../frontend
-
Install Dependencies:
npm install
-
Start the Development Server:
npm run dev
The frontend will be accessible at http://localhost:3000
.
Create a .env
file in the backend/
directory with the following:
SECRET_KEY=your_django_secret_key
EMAIL_HOST_USER=your_mailtrap_username
EMAIL_HOST_PASSWORD=your_mailtrap_password
EMAIL_PORT=587
Create a .env
file in the frontend/
directory with the following:
VITE_API_URL=http://localhost:5173
Use Postman for testing APIs. The following endpoints are included:
Method | Endpoint | Description |
---|---|---|
POST | /auth/jwt/create/ |
Login |
POST | /auth/jwt/refresh/ |
Refresh Token |
POST | /auth/users/ |
Register |
POST | /auth/users/activation/ |
Activate Account |
POST | /auth/users/reset_password/ |
Reset Password |
Method | Endpoint | Description |
---|---|---|
GET | /auth/users/me/ |
Retrieve Logged-in User |
PATCH | /auth/users/me/ |
Update Logged-in User |
---
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-branch
. - Open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more details.
- Author: ANMOL R SRIVASTAVA
- Email: arssite2020@gmail.com
Feel free to open an issue or submit a pull request if you have suggestions or improvements. 🚀