Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HydroPal is a progressive web application that tracks user water intake and calculates their plastic pollution.

License

NotificationsYou must be signed in to change notification settings

giannicharles/hydropal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A comprehensive water management application built with modern web technologies.

🚀 Quick Start

Follow these steps to get HydroPal running on your Windows machine using Docker.

📋 Prerequisites

  • Windows 10 (version 2004 or higher) or Windows 11
  • Administrator privileges for initial setup
  • At least 4GB RAM available for Docker

🛠️ Setup Guide - Windows PowerShell

1. Install WSL

Run PowerShell as Administrator and execute:

wsl--install

Note

If WSL is already installed, update it instead:

wsl--update

You will be prompted to restart your PC after installation.

2. Install Docker Desktop

winget install--id Docker.DockerDesktop-e--source winget

Important

After installation:

  • Restart your computer
  • Launch Docker Desktop from the Start menu
  • Ensure Docker Desktop is running (check system tray)
  • Enable WSL 2 integration in Docker settings

3. Install Git

winget install--id Git.Git-e--source winget

Tip

Restart PowerShell after installation to refresh the PATH.

4. Clone the Repository

git clone https://github.com/giannicharles/hydropal.git

Note

This will create ahydropal folder in your current directory. Usecd to navigate to your preferred location first if needed.

5. Navigate to Project Directory

cd hydropal

6. Create Environment Files

Create the required.env files for both frontend and backend:

Frontend environment file:

  1. Create a new file:frontend/.env
  2. Add this content:
VITE_API_URL=http://localhost:5000

Backend environment file:

  1. Create a new file:backend/.env
  2. Add this content:
MONGO_URI=mongodb://mongodb:27017/hydropal-dbJWT_SECRET=your_strong_secret_hereJWT_EXPIRE=30dFRONTEND_URL=http://localhost:3000NODE_ENV=development

Important

Security Recommendation: ChangeJWT_SECRET to a stronger, unique value:

JWT_SECRET=hydropal_strong_secret_key_2025_custom

Warning

Create these files manually using a text editor. PowerShell commands may cause encoding issues that prevent the database from working properly.

Note

These .env files are excluded from version control via.gitignore to protect configuration data.

7. Build and Start the Application

docker compose up-d

Note

Initial build may take several minutes. Once complete:

🐳 Docker Commands Reference

Basic Operations

CommandDescription
docker compose up -dBuild images and start all services in background
docker compose downStop and remove all containers
docker compose restartRestart all services
docker compose logsView logs from all services

Development Commands

# Rebuild and restart (useful during development)docker compose down && docker compose up-d--build# View running containersdocker ps# View all containers (including stopped)docker ps-a

Container Management

# Access container shelldocker exec-it<container_name>/bin/bash# View specific container logsdocker logs<container_name>-f# View container resource usagedocker stats

Database Operations

# Connect to MongoDBdocker exec-it hydropal-mongodb-1 mongosh# Inside MongoDB shelluse hydropal-dbshow collectionsdb.<collection_name>.find().pretty()

🔧 Troubleshooting

Common Issues

Docker not starting:

  • Ensure WSL 2 is properly installed
  • Check if virtualization is enabled in BIOS
  • Restart Docker Desktop service

Port conflicts:

  • Check if ports 3000 or 5000 are already in use
  • Modify port mappings indocker-compose.yml if needed

Permission errors:

  • Run PowerShell as Administrator
  • Ensure Docker Desktop has proper permissions

Getting Help

# Check Docker versiondocker--version# Check running servicesdocker compose ps# View system informationdocker system info

📁 Project Structure

hydropal/├── docker-compose.yml├── frontend/├── backend/└── README.md

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see theLICENSE file for details.

About

HydroPal is a progressive web application that tracks user water intake and calculates their plastic pollution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp