Git Product home page Git Product logo

simple-weather-app's Introduction

Very Simple Brutalist Weather App

Introduction

This Next.js Weather App provides real-time weather information in a responsive format. It features current weather updates, historical data, and options to save and retrieve weather conditions. The app, built using Next.js and Tailwind CSS, showcases a brutalist design and pulls data from Openmeteo (https://open-meteo.com/). By default, it displays weather for Toronto, Ontario, Canada, but users can easily change the location by adjusting longitude and latitude in the src/helpers/weather file.

Features

  • Current Weather: Shows the latest weather details, including temperature, condition, and last update time.
  • Timely Update Refreshes current weather data every 60 seconds.
  • Historical Weather Data: Access weather data from the past five days.
  • Saved Weather Conditions: Users can save weather data to a local database and view these records.
  • Responsive Design: Ensures compatibility across various devices.

Technologies Used

  • Next.js
  • TypeScript
  • Tailwind CSS
  • MongoDB

Getting Started

These instructions will guide you through setting up the project on your local machine for development and testing purposes.

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the repository

    Use Git to clone the project's repository to your local machine:

    git clone [email protected]:chok-di/simple-weather-app.git Your-Folder-Name
    cd Your-Folder-Name
  2. Install dependencies

    Navigate to the project directory and install the required npm packages:

    npm install
  3. Set up environment variables

    Create a .env.local file in the root directory of the project to store your environment variables, like your MongoDB URI. You can use .env.example as a reference.

    # .env.local
    MONGO_URI=your_mongodb_uri

    Replace your_mongodb_uri with the actual URI of your MongoDB database.

  4. Start your local MongoDB Instance Start MongoDB directly using the mongod command. First, ensure you have the default MongoDB data directory, which is /data/db. Create it with the correct permissions if it doesn't exist:

    sudo mkdir -p /data/db
    sudo chown `id -un` /data/db

    Then start MongoDB:

    mongod

    If you installed MongoDB using Homebrew, you can start MongoDB as a service:

    brew services start mongodb-community
  5. Start the development server

    npm run dev

simple-weather-app's People

Contributors

chok-di 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.