leetcoder2008/libraryspark
0
# LibrarySpark - Modern Library Management System
A complete library management system built with Flask (Python) and modern web technologies.
## Features
- Book management (add, view, search)
- Patron management (add, view, edit)
- Checkout and return system
- Analytics and reporting
- Responsive design for all devices
## Prerequisites
- Python 3.7+
- pip (Python package installer)
## Installation
1. Clone the repository:git clone <repository-url> cd libraryspark
2. Create a virtual environment:python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
3. Install dependencies:pip install -r requirements.txt
## Running the Application
1. Start the Flask server:python app.py
2. Open your browser and navigate to:http://localhost:5000
## Project Structure
- `app.py` - Main Flask application with all routes
- `requirements.txt` - Python dependencies
- `templates/` - HTML templates (if using template engine)
- `static/` - Static files (CSS, JS, images)
- `components/` - Web components for frontend
## API Endpoints
- `GET /api/books` - Get all books (paginated)
- `POST /api/books` - Add a new book
- `GET /api/patrons` - Get all patrons
- `POST /api/patrons` - Add a new patron
- `POST /api/checkout` - Checkout a book
- `POST /api/return/<id>` - Return a book
- `GET /api/stats` - Get library statistics
## Database
The application uses SQLite for development with SQLAlchemy ORM. The database is automatically created when you first run the application.
## Development
To modify the application:
1. Update routes in `app.py`
2. Modify HTML files for frontend changes
3. Update CSS in `style.css`
4. Add JavaScript functionality in `script.js`
## License
This project is licensed under the MIT License.