{"id":28554764,"url":"https://github.com/sazardev/human-resources-django","last_synced_at":"2025-07-07T18:32:38.011Z","repository":{"id":296605068,"uuid":"993896189","full_name":"sazardev/human-resources-django","owner":"sazardev","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-01T17:49:45.000Z","size":279,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-10T05:07:16.153Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sazardev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-31T18:52:40.000Z","updated_at":"2025-06-01T17:49:48.000Z","dependencies_parsed_at":"2025-06-01T08:29:47.138Z","dependency_job_id":"fc35bc44-598c-4d84-9ffc-584b120d9cd5","html_url":"https://github.com/sazardev/human-resources-django","commit_stats":null,"previous_names":["sazardev/human-resources-django"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sazardev/human-resources-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sazardev%2Fhuman-resources-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sazardev%2Fhuman-resources-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sazardev%2Fhuman-resources-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sazardev%2Fhuman-resources-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sazardev","download_url":"https://codeload.github.com/sazardev/human-resources-django/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sazardev%2Fhuman-resources-django/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264130536,"owners_count":23562048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-10T05:07:03.739Z","updated_at":"2025-07-07T18:32:38.005Z","avatar_url":"https://github.com/sazardev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Human Resources Management System\n\nA Django REST Framework application for managing human resources, including employee records, departments, and organizational data.\n\n## Features\n\n- **Employee Management**: Complete CRUD operations for employee records\n- **Department Organization**: Manage company departments and employee assignments\n- **Performance Tracking**: Comprehensive performance management system\n  - Performance Reviews with detailed ratings and feedback\n  - Performance Goals with progress tracking\n  - Performance Notes for observations and achievements\n- **REST API**: Full REST API with Django REST Framework\n- **Admin Interface**: Django admin for easy data management\n- **Environment Configuration**: Separate settings for development and production\n- **Database Support**: SQLite for development, PostgreSQL for production\n- **API Documentation**: Browsable API with Django REST Framework\n\n## Technology Stack\n\n- **Backend**: Django 5.2.1\n- **API**: Django REST Framework 3.16.0\n- **Database**: SQLite (dev) / PostgreSQL (prod)\n- **Environment Management**: python-dotenv\n- **Filtering**: django-filter\n- **Authentication**: Django built-in + Token authentication\n\n## Quick Start\n\n### Prerequisites\n\n- Python 3.8+\n- Git\n\n### Installation\n\n1. **Clone the repository** (if using git):\n\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd human-resources\n   ```\n\n2. **Create and activate virtual environment**:\n\n   ```bash\n   python -m venv venv\n\n   # On Windows\n   .\\venv\\Scripts\\Activate.ps1\n\n   # On macOS/Linux\n   source venv/bin/activate\n   ```\n\n3. **Install dependencies**:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Environment Configuration**:\n\n   - Copy `.env.example` to `.env` (if available) or create `.env` file\n   - Update environment variables as needed:\n     ```\n     DEBUG=True\n     SECRET_KEY=your-secret-key-here\n     DATABASE_URL=sqlite:///db.sqlite3\n     ```\n\n5. **Database Setup**:\n\n   ```bash\n   python manage.py makemigrations\n   python manage.py migrate\n   ```\n\n6. **Create Superuser**:\n\n   ```bash\n   python manage.py createsuperuser\n   ```\n\n7. **Run Development Server**:\n\n   ```bash\n   python manage.py runserver\n   ```\n\n8. **Access the Application**:\n   - API Root: http://127.0.0.1:8000/api/\n   - Admin Interface: http://127.0.0.1:8000/admin/\n   - API Documentation: http://127.0.0.1:8000/api/ (browsable API)\n\n## API Endpoints\n\n### Authentication\n\n- `POST /api-auth/login/` - Login\n- `POST /api-auth/logout/` - Logout\n\n### Employees\n\n- `GET /api/employees/` - List all employees\n- `POST /api/employees/` - Create new employee\n- `GET /api/employees/{id}/` - Get employee details\n- `PUT /api/employees/{id}/` - Update employee\n- `DELETE /api/employees/{id}/` - Delete employee\n- `POST /api/employees/{id}/change_status/` - Change employee status\n- `GET /api/employees/by_department/` - Filter employees by department\n- `GET /api/employees/statistics/` - Get employee statistics\n\n### Departments\n\n- `GET /api/departments/` - List all departments\n- `POST /api/departments/` - Create new department\n- `GET /api/departments/{id}/` - Get department details\n- `PUT /api/departments/{id}/` - Update department\n- `DELETE /api/departments/{id}/` - Delete department\n\n### Performance Reviews\n\n- `GET /api/performance-reviews/` - List all performance reviews\n- `POST /api/performance-reviews/` - Create new performance review\n- `GET /api/performance-reviews/{id}/` - Get performance review details\n- `PUT /api/performance-reviews/{id}/` - Update performance review\n- `DELETE /api/performance-reviews/{id}/` - Delete performance review\n- `GET /api/performance-reviews/statistics/` - Get review statistics\n- `GET /api/employees/{id}/performance-reviews/` - Get employee's reviews\n\n### Performance Goals\n\n- `GET /api/performance-goals/` - List all performance goals\n- `POST /api/performance-goals/` - Create new performance goal\n- `GET /api/performance-goals/{id}/` - Get performance goal details\n- `PUT /api/performance-goals/{id}/` - Update performance goal\n- `DELETE /api/performance-goals/{id}/` - Delete performance goal\n- `POST /api/performance-goals/{id}/update_progress/` - Update goal progress\n- `GET /api/performance-goals/overdue/` - Get overdue goals\n- `GET /api/employees/{id}/performance-goals/` - Get employee's goals\n\n### Performance Notes\n\n- `GET /api/performance-notes/` - List all performance notes\n- `POST /api/performance-notes/` - Create new performance note\n- `GET /api/performance-notes/{id}/` - Get performance note details\n- `PUT /api/performance-notes/{id}/` - Update performance note\n- `DELETE /api/performance-notes/{id}/` - Delete performance note\n- `GET /api/employees/{id}/performance-notes/` - Get employee's notes\n\n## API Features\n\n### Filtering\n\n- Filter employees by department, employment status, position\n- Search employees by name, email, employee ID, position\n- Order results by various fields\n\n### Pagination\n\n- Default page size: 20 items\n- Use `?page=N` parameter for navigation\n\n### Example API Usage\n\n```bash\n# Get all employees\ncurl -X GET http://127.0.0.1:8000/api/employees/\n\n# Search employees\ncurl -X GET \"http://127.0.0.1:8000/api/employees/?search=john\"\n\n# Filter by department\ncurl -X GET \"http://127.0.0.1:8000/api/employees/?department=1\"\n\n# Create new employee\ncurl -X POST http://127.0.0.1:8000/api/employees/ \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"employee_id\": \"EMP001\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"email\": \"john.doe@company.com\",\n    \"position\": \"Software Developer\",\n    \"hire_date\": \"2025-01-01\",\n    \"username\": \"johndoe\",\n    \"password\": \"securepassword123\"\n  }'\n```\n\n## Environment Configuration\n\n### Development (.env)\n\n```\nDEBUG=True\nSECRET_KEY=your-development-secret-key\nDATABASE_URL=sqlite:///db.sqlite3\nDB_ENGINE=django.db.backends.sqlite3\nDB_NAME=db.sqlite3\n```\n\n### Production (.env.production)\n\n```\nDEBUG=False\nSECRET_KEY=your-production-secret-key\nDATABASE_URL=postgresql://user:password@localhost:5432/hr_db\nDB_ENGINE=django.db.backends.postgresql\nDB_NAME=hr_db\nDB_USER=your_db_user\nDB_PASSWORD=your_db_password\nDB_HOST=localhost\nDB_PORT=5432\n```\n\n## Models\n\n### Employee Model\n\n- Personal information (name, email, phone)\n- Employment details (ID, department, position, status, salary)\n- Address information\n- Performance tracking properties\n- Timestamps\n\n### Department Model\n\n- Name and description\n- Timestamps\n\n### Performance Models\n\n#### PerformanceReview Model\n\n- Employee and reviewer information\n- Review type and period\n- Detailed ratings (technical skills, communication, teamwork, etc.)\n- Feedback and recommendations\n- Status tracking\n\n#### PerformanceGoal Model\n\n- Goal information and categorization\n- Timeline and progress tracking\n- Success criteria and outcomes\n- Status management with automatic updates\n\n#### PerformanceNote Model\n\n- Observations and achievements\n- Note types (achievement, feedback, coaching, etc.)\n- Privacy controls\n- Associations with goals and reviews\n\n## Development\n\n### Project Structure\n\n```\nhuman-resources/\n├── human_resources/        # Django project settings\n├── employees/             # Main application\n│   ├── models.py         # Database models\n│   ├── serializers.py    # API serializers\n│   ├── views.py          # API views\n│   ├── urls.py           # URL routing\n│   └── admin.py          # Admin configuration\n├── static/               # Static files\n├── media/                # Media files\n├── requirements.txt      # Python dependencies\n├── .env                  # Development environment variables\n├── .env.production       # Production environment template\n└── manage.py            # Django management script\n```\n\n### Adding New Features\n\n1. **Models**: Add new models in `employees/models.py`\n2. **Serializers**: Create serializers in `employees/serializers.py`\n3. **Views**: Add views in `employees/views.py`\n4. **URLs**: Register URLs in `employees/urls.py`\n5. **Admin**: Configure admin in `employees/admin.py`\n\n### Database Migrations\n\n```bash\n# Create migrations after model changes\npython manage.py makemigrations\n\n# Apply migrations\npython manage.py migrate\n\n# Check migration status\npython manage.py showmigrations\n```\n\n## Production Deployment\n\n1. **Environment Setup**:\n\n   - Set `DEBUG=False`\n   - Configure PostgreSQL database\n   - Set strong `SECRET_KEY`\n\n2. **Database**:\n\n   - Install PostgreSQL\n   - Create database and user\n   - Update environment variables\n\n3. **Static Files**:\n\n   ```bash\n   python manage.py collectstatic\n   ```\n\n4. **Security Considerations**:\n   - Use HTTPS\n   - Configure `ALLOWED_HOSTS`\n   - Set up proper firewall rules\n   - Use environment variables for secrets\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests\n5. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Support\n\nFor support or questions, please contact the development team or create an issue in the project repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsazardev%2Fhuman-resources-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsazardev%2Fhuman-resources-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsazardev%2Fhuman-resources-django/lists"}