Skip to content

GODSROBOT/LibraryPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚✨ Static Public Pages

These HTML files form the public-facing pages of the digital library. They include navigation, styling, and references to shared assets.


🌐 static/index.html — Landing Page

This is the landing page.

  • 🧭 Responsive navbar (Home, About, Pricing, Contact, User Dashboard)
  • 🎨 Loads Bootstrap, Google Fonts, Font Awesome
  • 🎞️ Hero section, features, footer
  • ⚙️ Scripts: animations.js, simple-books.js
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Digital Library – Home</title>
  <link rel="stylesheet" href="/static/css/main.css">
</head>
<body>
  <nav></nav>
  <section class="hero"></section>
  <footer></footer>
  <script src="/static/js/animations.js"></script>
  <script src="/static/js/simple-books.js"></script>
</body>
</html>

🧑‍🚀 static/about.html

  • 🚀 Particle animations (particles.js)
  • 🪪 Team & mission section
  • 🟦 Uses about.css & about.js

💰 static/pricing.html

  • 📦 Subscription tiers: Free & Premium
  • 🔄 Billing cycle toggle
  • 🔗 Redirects via dashboard.js

✉️ static/contact.html

  • 📮 Contact form: Name, Email, Message
  • ✔️ Validation via contact.js
  • 📤 Submits to /api/contact

🔐 Public Authentication Pages

🔒 static/auth/login.html

  • 📧 Email + Password login
  • 🔗 Register / Forgot Password links
  • ⚙️ Uses auth.js/api/auth/login

🆕 static/auth/register.html

  • 📝 Name, Email, Password
  • 💪 Password strength meter
  • 📤 Sends data via auth.js

🔑 static/auth/user-forgot-password.html

  • 2-step reset: Email → Token + New Password
  • 🔄 Controlled by user-forgot-password.js

⚙️ JavaScript Modules

🎞️ animations.js

  • Scroll animations
  • Parallax & particle effects

📊 about.js

  • Loads stats → displays counters/cards

✉️ contact.js

  • Form validation
  • POST to /api/contact

🔐 auth.js

  • Login/Register utility
  • Token storage, redirects

🔑 user-forgot-password.js

  • Multi-step password recovery handler

🧑‍💼 user-profile.js

  • Fetch/update user details

📈 user-dashboard.js

  • Borrowing stats → charts/tables

🧭 dashboard.js

  • Tab logic, theme switch, charts

📚 simple-books.js

  • Fetch & render book list

📘 book_management.js

  • Admin CRUD for books

👥 user_management.js

  • Admin user table (search, pagination)

🛠️ admin-utils.js

  • Shared admin API & notifications

🛂 admin-login.js

  • Admin login handler

🆔 admin-signup.js

  • Admin registration

🔏 admin-forgot-password.js

  • Admin password reset

📊 admin-dashboard.js

  • Loads system-wide stats

🧾 admin-users.js

  • Ban/unban, user edits

⚠️ error-pages.js

  • Custom 404/500 routing

🖋️ Server-Side Templates (Jinja2)

🛑 templates/Error/*.html

  • Friendly messages for HTTP errors

📊 templates/dashboard.html

  • User dashboard shell

👤 templates/users/profile.html

  • Profile editing page

📚 templates/library/books.html

  • Filterable book list

🛠️ Admin templates

  • Login, signup, forgot password
  • Dashboard, book management, user management

🐍 Backend Application

app.py

  • Flask app setup
  • JWT auth
  • API routes for users, books, admin, borrowings
  • Error handlers
@app.route('/api/auth/login', methods=['POST'])
def login():
    return jsonify({'status':'success','data':{'access_token':access,'refresh_token':refresh}})

🗄️ db.py

  • MySQL pooling
  • Auto-create DB
  • get_db() helper

🗃️ Database Schema
erDiagram
    users {
        int id PK
        string name
        string email
        string password
        bool is_admin
        bool is_subscriber
        string status
        datetime created_at
    }
    books {
        int id PK
        string title
        string author
        string category
        decimal price
        int rating
        int total_copies
        int available_copies
        text description
        datetime created_at
    }
    borrowings {
        int id PK
        int user_id FK
        int book_id FK
        datetime borrowed_at
        datetime due_at
        datetime returned_at
        string status
    }
    password_resets {
        int id PK
        int user_id FK
        string token
        datetime expires_at
        bool used
        datetime created_at
    }
    refresh_tokens {
        int id PK
        int user_id FK
        string token
        datetime created_at
    }
Loading

🧰 Tech Stack

Tech Stack Logos

HTML5 CSS3 Bootstrap JavaScript Python Flask MariaDB MySQL Git

Backend 🐍

  • Python 3
  • Flask 2
  • Jinja2
  • PyJWT
  • passlib
  • python-dotenv

Database 🗄️

  • MySQL / MariaDB
  • mysql-connector-python

Frontend 🎨

  • HTML5, CSS3, JS (ES6+)
  • Bootstrap 5
  • Font Awesome 6
  • Custom JS modules

Tools 🛠️

  • Mermaid diagrams
  • venv
  • Flask dev server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors