Python
Django
Django Testing Tool: TestCase
CLI (Command Line Interface) application
Git
GitHub
Branching
SQLite
SQL
JSON Web Token (JWT)
Authentication
Create, Read, Update, and Delete operations (CRUD)
Permissionsystem
Faker package
Menu-navigation
This Django project involved building a comprehensive management system using a command-line interface (CLI) tool, complete with authentication, data handling, and CRUD operations, while ensuring a structured, permission-based access control system.
Project Highlights:
This project demonstrates how complex backend administration tasks can be simplified through a well-designed command-line interface, with secure authentication, intuitive user inputs, and a structured approach to data management.
1. Django Management Commands and CLI Management Tool
The project centered around a custom Django Management Command designed to serve as a CLI-based management tool. It provided a smooth interface for interacting with the application’s models directly from the terminal. This tool supported a range of operations, from creating and updating data to managing complex workflows, making administrative tasks seamless.
2. Authentication and JWT Token Integration
Authentication was implemented using Django's built-in login and logout mechanisms, enhanced with JWT (JSON Web Tokens) for secure and scalable token-based authentication. This ensured that user sessions could be managed effectively, providing an extra layer of security and a means to implement permission-based actions within the CLI tool.
3. Custom Input Methods for Enhanced CLI Interaction
To improve the usability of the CLI management tool, I created a set of custom input classmethods, tailored to handle various data types including text, integers, decimals, emails, passwords, dates, and multiple-choice options. This flexibility allowed for precise data input and validation, ensuring that administrators could interact intuitively with the system.
4. Implemented Input Types:
5. Data Creation Using Faker for Realistic Initial Data
To populate the application with realistic data, I used the Faker library to generate initial datasets for employees, clients, contracts, and events. This enabled testing and demonstration of various functionalities without relying on manually entered sample data, enhancing the robustness of the development environment.
6. CRUD Operations and Permission System
The CLI management tool supported full CRUD (Create, Read, Update, Delete) operations for each core entity in the system, enabling efficient data management. A granular permission system was also integrated, restricting access to certain commands and data manipulations based on user roles and JWT-based session management.
7. Custom Messages and Feedback Mechanisms
I implemented a variety of custom messages to provide clear feedback during operations, such as success or error messages for CRUD operations, input validation responses, and permission-based access alerts. This ensured that administrators received immediate and meaningful feedback for each action performed in the CLI tool.
8. Creating a Structured Menu for CLI Navigation
A structured menu system was developed to organize various CLI commands and options. This provided a logical hierarchy for administrators to navigate through different functionalities, such as managing employee records, viewing client data, or generating event reports. This modular structure allowed the tool to scale as more features were added.
9. Tabulate Integration for Terminal Display
For better data visualization, I integrated the tabulate library to display records in a tabular format directly in the terminal. This enhanced the readability of large datasets, making it easier for administrators to review and analyze information without switching to an external tool.