Giter VIP home page Giter VIP logo

bookshelf's Introduction

The Bookshelf

This is the source code for a virtual library of all the books you want to keep tabs on, those sneaky buggers tend to run off in search of adventure.

You can visit the live application here.

This project’s origin is as the demo for Meks’ talk "The Bookshelf: Engage Your Users with LiveView and Tailwind CSS", presented at ElixirConf EU, 2024.

Contact

Meks McClure (they/them)

Presentation

Presentation & Demo Resources

Further Reading and Resources

Development

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

bookshelf's People

Contributors

mmcclure11 avatar

Stargazers

Mark Keele avatar Yury Velikanau avatar  avatar Tomasz Kowal avatar Dan Janowski avatar Ruan Pienaar avatar  avatar

Watchers

N. G. Scheurich avatar  avatar

bookshelf's Issues

Add Custom Styles Table

  • Title
  • Header row
  • data rows
  • Extend Colors!
  • Better names for fonts?
  • Overwrite theme for fonts, make a new default
  • padding and margins
  • font sizes, tracking, and leading
  • left some comments/questions for Nick in the PR

The Phases

Finalize the phase names.

  1. Basic Display
  2. Custom App Styles
  3. Live Filter
  4. Upgrade Table
  5. Wow Factor

Create GitHub tags for the Phases.

Add Default Display Search

  • use default input styling
  • search button
  • pressing click refreshes the page and shows only relevant table data
  • the search params checks the title, author, and genre.

Questions

  • Should there be one search for the whole table, or each searchable column gets its own search?
  • When you click search, how do we know what was searched and how to use that to display? does it go into the url params? What happens to the search criteria? Do we clear out the input or leave it? If we clear it, do we display the search terms somewhere on the page?

Create Icon/Logo

Create a logo to go at the top of each page.

A small lizard like dragon curled around a messy pile of books.
Create a simplified version that can be used as a favicon.

Add Favicon

<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
  <path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25" />
</svg>

Image

^ From Hero Icons

This would be acceptable as a first pass.

This article is out of date, there is no longer a static folder under assets.

Could use some help from @ngscheurich.

Add instructions

Add a NOTES.md file where I can jot down step by step instructions.

  • things like what we did on 16-01-2024
  • setting up the app, repo, and deployment to fly.io

Sketch out the UI

Due 2024-01-26.

Draw out what the app should look like in the different ”phases” of the project.
Decide what GitHub tags should be associated with that.

Add "Data" Module

  • Create a struct type
  • Fields:
    • title
    • author
    • genre
    • review
    • date read (makes it feel like a personal bookshelf)
    • status ~(want_to_read, in_progress, complete)
    • URL to the cover art...
      • As part of a modal that pops up with details

To Add in the Future (not for conf talk):

  • year published
  • something about if it is in a series and which number it is

Don't codify this until the sketch is done. ✅

  • Books/Authors to include
    • Rebecca Roanhorse
    • The Name of the Wind
    • N. K. Jemisin
    • The Priory of the Orange Tree

Deploy fails in github CI/CD pipeline

Github deploy error:

image: registry.fly.io/bookshelf-meks:deployment-01HPJMGZ10798YVF33WAM7GY6Y
image size: 124 MB
Error: could not read file /Users/mmcclure/Code/bookshelf/priv/books.toml: open /Users/mmcclure/Code/bookshelf/priv/books.toml: no such file or directory
Error: Process completed with exit code 1.

We’ve hard-coded that path in fly.toml: local_path = "/Users/mmcclure/Code/bookshelf/priv/books.toml". We missed a pretty pungent code smell—your app should never reference anything on a particular user’s machine

Move the books.toml file path to an environment variable and then anyone that needs to access the file will need to set that variable.

Meks needs to set it in their local environment, then it will need to be set for Fly.io and Github.

Update ReadMe

Add fly.io address
Description of what the app is for.
Link to ElixirConf EU speaker page.

Unknown atoms error

Every once in a while I get an error indicating that the app doesn’t have a reference for when invoking string_to_existing_atom. I then just manually type in the missing atoms into my iex session and it starts working. I’m concerned for what might happen if this is an issue in production.

CleanShot.2024-02-12.at.10.52.23.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.