Skip to content

This is a side project of a group of Singapore book lovers who want a quick and efficient view to available Singapore library books. We are currently still in beta version, and are working to release the web app more officially to the public in 2025!

License

Notifications You must be signed in to change notification settings

cliffchew84/SG-Lib-Books

Repository files navigation

Web App - Books Available in SG Libraries (NLB)

This is the repository for a side project, SGLibReads, which is a free web app for Singapore residents to search, save and more easily view the availability of Singapore library books. If you are a heavy user of the Singapore libraries, consider giving this web app a try.

Tell Me Why?

Why One - Providing a better way to search for NLB books

As of 2023, both the Singapore National Library Board’s (NLB) app and website are great and functional. However, I found it difficult to save and search for book availability on their app and website. Wanting an easier way to hunt down the library books, I hacked out a rudimentary technical solution for my own personal use. As the stars started to align and I learned more technical skills, thanks to NLB and the NLB Udemy Biz account no less, I realised I could develop a solution for the general Singapore public too. I hope to create value for the Singapore public, using skills I learned from public funds.

Why Two - Changing SG government tech culture

When I learned about the NLB public APIs, I realise I could use it for this side project. Unfortunately, the NLB API has so far provided a rather subpar developer experience (see my review here). Nonetheless, I do feel this is also a chance to start more conversations on how some of our government agencies are running their tech deployments. I know there are competent government agencies running excellent tech solutions for Singapore too, and I hope this side project can do its part to contribute to the further strengthening of the Singapore technical core. Those interested in this conversation can follow me on Medium, or add me on Linkedin.

Why Three - Adding more technical skills

This side project is also a way for me to continue to learn and apply more technical skills into a reasonably real-world setting. Some of the possible features I hope to learn and include into this web app includes:

  1. Availability of eBooks
  2. Linking to NLB Events from EventBrite
  3. Recommending books

Getting Started

The following section details the step it takes to start-up a local Supabase and FastAPI server for development purpose.

Prerequisite: Supabase CLI

The Supabase CLI is required to manage the database schema and seed data. Please follow the instructions below:

  1. Install Supabase CLI using the official guide in your local machine here.

  2. Authenticate Supabase CLI with the following command:

supabase login
  1. Run supabase start to take note of the local Supabase URL and API Key.
supabase start
  1. Copy and Update the .env file with the Supabase API Key before beginning of any development.

FastAPI Server

  1. Install uv in your local machine. Please follow the official guide for more information.

  2. Update .env file with APIKeys from .env.example template.

    cp .env.example .env
  3. Start-up Supabase server with supabase-cli and docker.

    supabase start
  4. Start-up FastAPI server with Uvicorn and hot-reloading for development purpose. This command will install create virtual environment in .venv and install all dependencies before starting the server.

    uv run -- uvicorn src.main:app --reload

Code Linting and Formating

This project uses ruff as Python code linter and formatter.

To integrate this seamlessly to your development workflow, we recommend using pre-commit to run the formatter and linter before commiting to the repo.

  1. run pre-commit install to set up the git hook scripts

    $ pre-commit install
    pre-commit installed at .git/hooks/pre-commit
  2. run git commit as usual to commit your changes.

About

This is a side project of a group of Singapore book lovers who want a quick and efficient view to available Singapore library books. We are currently still in beta version, and are working to release the web app more officially to the public in 2025!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •