Skip to content

🌞 Sun360 is a user-friendly app designed to safeguard individuals in Victoria, Australia, from harmful UV rays. It provides UV Index, temperature updates, clothing recommendations, sunscreen reminders, and family management features to ensure safe outdoor experiences.

License

Notifications You must be signed in to change notification settings

lokeshagg13/sun360

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌞 Sun360

Sun360 is a user-friendly application designed to protect individuals in Victoria, Australia, from harmful UV rays. It provides essential UV-related information and recommendations tailored to different age groups and genders, ensuring a safe and informed experience under the sun.


✨ Features

  1. πŸ“Š UV Impact Visualization:

    • Graphical representation of UV impacts across various age groups and genders.
  2. πŸ“ Location-based UV Index and Temperature:

    • Check UV Index and temperature for any location in Victoria using its postcode.
  3. πŸ‘• Clothing Recommendations:

    • Provides clothing suggestions based on the current UV Index.
  4. ⏰ Sunscreen Reminders:

    • Personalized reminders for sunscreen application for users and their family members.
  5. πŸ‘¨β€πŸ‘©β€πŸ‘§ Family Management:

    • Register and manage family members for customized settings and reminders.
  6. βš™οΈ Settings Customization:

    • Tailor the application to suit personal preferences.

πŸ› οΈ Installation

Prerequisites:

  • Python 3.8 or higher
  • PostgreSQL database

Steps:

  1. Clone the repository:

    git clone https://github.com/your-repo/sun360.git
  2. Navigate to the project directory:

    cd sun360
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up environment variables:

    • Create a .env file in the root directory.
    • Add the following variables:
      FLASK_APP=app.py
      FLASK_ENV=dev or production
      DATABASE_URL=your_database_url
      OPEN_WEATHER_API_KEY=your_openweather_api_key
      
  5. Start the application:

    python app.py

πŸ—‚οΈ File Structure

Backend

  • app.py:

    • Main application file containing routes, middleware, and API logic.
  • models.py:

    • Defines database models such as Users, FamilyMember, Suburb, and more.
  • database.py:

    • Contains SQLAlchemy database initialization.

Utilities

  • api_requests.csv:

    • Tracks the number of API requests to external services.
  • .env:

    • Environment variables for secure configurations.

πŸ“¦ Dependencies

  • Frameworks and Libraries:

    • Flask
    • Flask-CORS
    • SQLAlchemy
    • dotenv
  • Database:

    • PostgreSQL
  • API Services:

    • 🌀️ OpenWeather API
  • Other Utilities:

    • πŸ” Werkzeug
    • πŸ“œ CSV

πŸš€ Usage

  1. πŸ”‘ Login and Registration:

    • Users can register with their details, including family members.
    • Login using the registered email and password.
  2. β˜€οΈ Check UV and Temperature:

    • Enter a postcode to view the UV Index and temperature for the area.
  3. πŸ‘• Get Clothing Recommendations:

    • Receive clothing suggestions based on UV levels.
  4. ⏰ Set Sunscreen Reminders:

    • Create personalized reminders for sunscreen application.
  5. πŸ‘¨β€πŸ‘©β€πŸ‘§ Manage Family Members:

    • Add or modify family members’ details for tailored notifications.

🌐 API Endpoints

  • πŸ”‘ User Authentication:

    • /login: POST - Login user.
    • /logout: GET - Logout user.
  • πŸ‘€ User Management:

    • /users: POST - Register a new user.
    • /users/<id>: GET/PUT/DELETE - Manage user details.
  • β˜€οΈ UV and Temperature:

    • /suburbs/<postcode>: GET - Fetch suburb information.
    • /suburbs/<postcode>/record: GET - Get UV Index and temperature.
  • ⏰ Sunscreen Reminders:

    • /users/<id>/sunscreen-reminders: GET/POST - Manage reminders.

🀝 Contributing

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes with descriptive messages.
  4. Submit a pull request.

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ“š References

  1. Favicon Generator - favicon.io

    • The favicon was generated using the following graphics from Twitter Twemoji:
  2. OpenWeatherMap One Call API

  3. When to Protect Yourself from UV - Generation SunSmart

  4. What is Ultraviolet (UV) Radiation? - AIM at Melanoma

  5. Cancer Incidence Age-Standardised Rates - AIHW


πŸ“§ Contact

For any inquiries or support, please contact lkaggarwal1997@gmail.com.

About

🌞 Sun360 is a user-friendly app designed to safeguard individuals in Victoria, Australia, from harmful UV rays. It provides UV Index, temperature updates, clothing recommendations, sunscreen reminders, and family management features to ensure safe outdoor experiences.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published