Skip to content

joeqj/ambient-weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ambient Weather

Turning weather into ambient soundscapes 🌤️ 🌧️ ❄️

Built with Nodejs and Vite.

System Requirements

  • Node v20.10.0 or higher
  • nodemon
  • ts-node

Getting Started

To create a database container use docker in the project root:

docker-compose up -d

The database table weather will need to be created in the database. The structure of this can be figured out from the databaseResult type in the project. Alternatively reach out and I can provide a SQL dump.

To start the server:

cd server
npm install
npm start

You will need to create an account on OpenWeather and create an API key to add to our .env file in the server directory:

OPENWEATHER_APIKEY=<your_api_key>

You can also add database connection credentials in here. Appropriate fallbacks have been declared in the server's config.ts file that will work with the default docker configuration.

You will then be able to visit http://localhost:3333/weather/get in your browser to fetch the latest record from the database

Once setup start the front-end:

cd web
npm install
npm run dev

You will need to specify the API url in a .env file in the web directory:

VITE_API_URL=http://localhost:3333

Todo

Server

  • Fetch weather data for Leeds, UK and store in our database
  • Scheduled cron job to store data on the hour every hour
  • Store data for the hour in global JS object so we don't need to query the database on every request
  • Create GitHub action to deploy main branch to hosting via SSH that will also restart application
  • Refactor code for legibility
  • Write some unit tests with Jest
  • Add all capital cities in the world
  • Drop scheduled cron job to 4 times a day

Front-end

  • Build out initial front-end interface and tonejs intergration
  • Test out all possible weather states and create presets for tonejs
  • Incorporate more of the data available to influence sound
  • Info section / submissions
  • Flesh out UI
  • Background gradients based on weather and day/night cycle
  • Convert build to a PWA
  • Finalise design and logo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors