Git Product home page Git Product logo

beer-collection's Introduction

Beer collection

The Beer Collection is a web application that features a catalog of Punk beers. With this application, users can create their own custom collections from the Punk catalog.

Architecture

For this project, I decided to use the Radix UI framework and themes. It allows for the quick development of beautiful applications with fast coding. Additionally, I included the Stitches styled library based on class tokens to ensure good performance for pages.

Using NextJS and its server-side rendering power, I can optimize pages for both performance and SEO.

To persist user sessions and collection information on the backend side, I have decided to use Vercel KV. This is a Redis persistence database in-memory, which has excellent performance. To ensure data persistence and optimal performance for user sessions and collection information on the backend side, I decided to use Vercel KV. This Redis persistence database in-memory provides excellent performance and reliability.

I have chosen to use the Cypress suite for testing purposes, as it is a highly efficient testing framework that is well integrated with both React and NextJS. Cypress offers a range of features that allow for comprehensive testing of web applications, such as automated testing, debugging, and real-time reloads. Additionally, Cypress provides an easy-to-use interface for creating and managing test suites, making it a great choice for developers of all skill levels. By utilizing the Cypress suite, I can ensure that my website is thoroughly tested and optimized for optimal performance and user experience.

To host this project on the web, I have decided to use the Vercel platform, which is optimized for NextJS.

Technologies and libraries

Lighthouse performance report

Alt text

A project directory layout

.
├── cypress
    ├── downloads
    ├── e2e
    ├── fixtures
    ├── support
├── public
    ├── assets
├── src                     # Source files
    ├── gray-matter
    ├── modules
        ├── common
        ├── components
        ├── libs
        ├── theme
    ├── pages
        ├── api
    ├── styles

Requirements

Vercel KV storage https://vercel.com/docs/storage/vercel-kv

Environment variables:

Create a new file named .env.local in the project's root directory and add the following variables to it:

# .env.example, committed to repo
PUNK_API_URL=
SITE_URL=
MAX_ITEMS_PER_PAGE=
MAX_BEER_ID=
KV_URL=
KV_REST_API_URL=
KV_REST_API_TOKEN=
KV_REST_API_READ_ONLY_TOKEN=
REDIS_COLLECTION_PREFIX=

Getting Started

Install dependencies:

npm install

First, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

Cypress Tests

npm run cypress

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

beer-collection's People

Contributors

strapazzon avatar

Watchers

 avatar

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.