This is a repository for Ethiopian digital library
# π EtLib β Ethiopian Digital Library API
EtLib is a RESTful API built with **Django REST Framework** and **MySQL**, designed to serve as a digital library system for Ethiopian institutions, schools, and communities.
It allows **librarians** to manage book inventories and **users** to borrow and return books.
The goal is to improve access to books and learning materials digitally.
---
## π Live Demo
- π Backend API
---
## π§° Tech Stack
- Django + Django REST Framework
- MySQL (Relational Database)
- JWT Authentication (`djangorestframework-simplejwt`)
- RESTful API
---
## π Project Structure
```
etlib/
βββ books/ # Book management (CRUD + Borrow/Return)
β βββ models.py
β βββ serializers.py
β βββ views.py
β βββ urls.py
βββ users/ # User management + authentication
β βββ models.py
β βββ serializers.py
β βββ views.py
β βββ urls.py
βββ etlib/ # Main Django configuration
β βββ settings.py
β βββ urls.py
βββ manage.py
βββ requirements.txt
βββ README.md
```
---
## π Getting Started
```bash
# Clone the repo
git clone
github.com
# Navigate to the project directory
cd EtLib
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Apply migrations
python manage.py migrate
# Create a superuser for admin access
python manage.py createsuperuser
# Run the development server
python manage.py runserver
```
Open
127.0.0.1 with your browser or test endpoints in **Postman**.
---
## π Environment Variables
Create a `.env` file and configure your database + secret key:
```
SECRET_KEY=your_django_secret_key
DEBUG=True
DB_NAME=etlib_db
DB_USER=etlib_user
DB_PASSWORD=abc123
DB_HOST=localhost
DB_PORT=3306
```
---
## π§ͺ Testing with Postman
- β
Register β Login β Get JWT token
- β
Add Book (Librarian only)
- β
List/Search Books (All users)
- β
Checkout B β¦