{"id":16988905,"url":"https://github.com/wxiaoyun/lms-backend","last_synced_at":"2025-11-07T16:30:31.020Z","repository":{"id":187122686,"uuid":"676062551","full_name":"wxiaoyun/lms-backend","owner":"wxiaoyun","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-06T04:24:08.000Z","size":50084,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T23:04:02.685Z","etag":null,"topics":["fiber-framework","go","golang","gorm-orm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wxiaoyun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-08-08T10:52:23.000Z","updated_at":"2024-05-20T07:09:20.000Z","dependencies_parsed_at":"2024-06-01T04:51:43.402Z","dependency_job_id":null,"html_url":"https://github.com/wxiaoyun/lms-backend","commit_stats":null,"previous_names":["foraeons/lms-backend","wxiaoyun/lms-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxiaoyun%2Flms-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxiaoyun%2Flms-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxiaoyun%2Flms-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxiaoyun%2Flms-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wxiaoyun","download_url":"https://codeload.github.com/wxiaoyun/lms-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239533064,"owners_count":19654617,"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":["fiber-framework","go","golang","gorm-orm"],"created_at":"2024-10-14T03:05:00.425Z","updated_at":"2025-11-07T16:30:30.988Z","avatar_url":"https://github.com/wxiaoyun.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library Management System Backend\n\nWelcome to the backend of our Library Management System (LMS). Designed for efficiency and scalability, this system forms the backbone of a simple digital library management solution. Leveraging cutting-edge technologies and robust architectures, our LMS backend efficiently handles complex library operations, ensuring reliability and high performance.\n\n## Key Features\n\n- **Robust Digital Library Management**: Manages digital assets with advanced backend functionalities.\n- **Full CRUD Operations**: Supports Create, Read, Update, and Delete (CRUD) operations for books, loans, reservations, fines, and user accounts.\n- **Advanced Admin Capabilities**: Provides administrative tools for efficient and effective library management.\n- **Role-Based Access Control (RBAC)**: Implements fine-grained access control for secure and efficient management of library resources.\n- **Session-Based Authentication**: Ensures secure user authentication and management.\n- **Dockerized Deployment**: Offers a convenient way to deploy the backend with Docker.\n- **Scalable Data Storage with Postgres**: Utilizes PostgreSQL for robust and scalable data storage.\n- **Redis for Performance**: Leverages Redis for high-speed caching and session storage, ensuring a responsive and efficient system.\n\n## Core Technologies\n\nThe LMS backend is built using a range of powerful technologies:\n\n- **Language**: [Go (Golang)](https://go.dev/doc/install) - Renowned for its efficiency and scalability in backend development.\n- **ORM**: [GORM](https://gorm.io/index.html) - Offers a developer-friendly ORM library for Go.\n- **Framework**: [Fiber](https://docs.gofiber.io/) - An Express-inspired, high-performance web framework for Go.\n- **Databases**:\n  - [**Postgres**](https://www.postgresql.org/): A versatile and reliable relational database system.\n  - [**Redis**](https://redis.io/): A fast key-value store, excellent for caching and session storage.\n- **Deployment**: [Docker](https://www.docker.com/) - A containerization platform for easy deployment.\n\n## Accessing a Deployed Version\n\nFor those interested in exploring a deployed version of this setup, it is available for viewing and interaction:\n\n- **Deployed on Railway**:\n  - Visit the deployed version on Railway at [this link](https://railway.app/project/d296ea6f-2941-4176-8b32-ef7e210cf56a).\n\nThis deployed instance provides a convenient way to see the PostgreSQL and Redis services in action without the need for local installation.\n\n## Setup Instructions\n\n### 1. Install Go\n\nDownload and install Go from [here](https://go.dev/doc/install).\n\n### 2. Update Environment Variables\n\n- Copy `.env.example` to `.env.development`.\n- Modify the variables in `.env.development` to suit your environment.\n\n### 3. Running the Server\n\nStart the server with:\n\n```bash\nmake dockerup\n```\n\n### 4. Setting up Database\n\nRun the docker-compose file to start the database:\n\n```bash\n# Keep the container running in a separate terminal\nmake dockerup\n```\n\nRun the database migrations:\n\n```bash\n# Execute a Shell Inside the Container\nmake dockershell\n```\n\n- Run the following commands inside the container:\n- Create the database: `go run cmd/createdb/main.go`\n- Migrate the database: `go run cmd/migratedb/main.go -dir=up`\n- Rollback the database (specify the number of steps to roll back): `go run cmd/migratedb/main.go -dir=down -step= #$(step)`\n- Seed the database: `go run cmd/seeddb/main.go`\n- Drop all tables (if necessary): `go run cmd/flushdb/main.go`\n- Drop the database (if necessary): `go run cmd/dropdb/main.go`\n- Exit the container: `exit`\n\n### 5. Persisting File Storage\n\n- Create a docker volume for file storage and mount it at `/app/file_storage` in the container.\n\n### 6. Making Changes to Frontend\n\nThe current is a single-page application (SPA) built using React. You can find the source code [here](https://github.com/ForAeons/lms-frontend-v2).\n\nThe backend is designed to serve the frontend as static files. If you wish to make changes to the frontend, you will need to set up the frontend locally and build the frontend files by running the following commands:\n\n```bash\n# cd into the frontend folder\nbun run build\n```\n\nOnce the frontend files have been built, copy the files from the `dist` folder to the `frontend` folder in the backend.\n\n```bash\nmv path_to_frontend/dist/* path_to_backend/frontend/\n```\n\nGreat! You are now ready to serve the updated frontend from the backend.\n\n### 7. Additional Development Setup\n\nInstall necessary Go packages and initialize Git hooks:\n\n```bash\ngo get -u github.com/swellaby/captain-githook\ncaptain-githook init\n```\n\n---\n\nOur Library Management System Backend is designed to meet the needs of simple libraries, offering a perfect blend of performance, security, and ease of maintenance. Whether for academic, public, or private libraries, it provides the essential infrastructure to manage library operations effectively and efficiently.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxiaoyun%2Flms-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwxiaoyun%2Flms-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxiaoyun%2Flms-backend/lists"}