Coder Social home page Coder Social logo

chrisweb's Introduction

This is a Next.js project bootstrapped with create-next-app. It's mostly just a personal space to for me to practice with Next.js and React, but I also have a little Sonos app that talks to the Sonos Node API I have running on a Raspberry Pi elsewhere in the house. Eventually it's going to also host code to access my old blog locally if I want to look up something there.

Sonos Controller

A front-end React app designed to interface with a Sonos Node API running elsewhere on the network. For situations where the official Sonos control apps are unavailable or is otherwise not wanted.

Getting Started

To run the development server:

npm run dev

Open http://localhost:3000/sonos with your browser to see the Sonos controller app.

Main app root page is src/app/sonos/page.tsx.

Building and deploying

To build a production server

npm run build

To run server after building

npm run start

Docker

This application can also be Dockerized.

Prerequisites

  • Docker must be installed
  • User must have permission to access Docker

Updater script

There is a simple script that automatically builds, stops, and starts a new Docker-based server.

Blog viewer

TBD

chrisweb's People

Contributors

cjbrunner avatar

Watchers

 avatar

chrisweb's Issues

Have app auto-start on server

Currently running manually via the command line:

npm run build
nohup npm run start

Not ideal.

  • Set up auto-start of app at server boot-up (docker run -d --restart)
  • Support for updating the app and restarting if necessary (updatedockerImage.sh)
  • Stop old server

Add polling to keep song info up-to-date

Currently, the song info displayed will remain the same until the page refreshes, so new song info won't change even if the song playing changes. Looks like some kind of polling is required, since there is no signal sent from the server on song changes.

Implement useReducer to combine state

Use useReducer as soon as there is more than one related bit of state, i.e. isLoading and the sonosInfo. Each set state call triggers its own re-render, so combining them into a reducer call cuts down on those.

[EPIC] Add ChrisWeb blog archive

TODO:

  • Locate DB export dump file. I know I have it somewhere...
  • Figure out how Next.js generally talks to DB's
  • Load DB export into DB (system DB? containerized DB?)
  • Create DB client (in /src/app/lib)
  • Create UI (in /src/app/chrisweb)

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.