Skip to content

JunLongling/MyPerseverance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About The Project

MyPerseverance

MyPerseverance is a productivity and self-growth tracker that helps users log their daily tasks, visualize their consistency using a heatmap calendar, and build better habits through small, repeatable actions. Inspired by apps like LeetCode and GitHub's contribution graph, it encourages users to stay accountable by tracking real progress—one step at a time.

Built With

This project is built with a modern, decoupled architecture and is fully containerized for easy setup and deployment.

  • React
  • TailwindCSS
  • Spring Boot
  • PostgreSQL
  • Docker

Getting Started

This project uses Docker to create a consistent and easy-to-run development environment. The following steps will get a local copy of the entire full-stack application up and running.

Prerequisites

To build and run this project, you will need the following tools installed on your system:

Note: While the final application runs entirely within Docker containers, a JDK is required on your local machine to initially build the backend application (.jar file). Please ensure Docker Desktop is running on your machine before you proceed with the setup steps, as it is needed for the build and testing phase.

Installation & Setup

Follow these simple steps to set up and run the entire project.

  1. Clone the Repo

    git clone https://github.com/JunLongling/MyPerseverance.git
    cd MyPerseverance
  2. Configure Environment Variables This project uses separate .env files for backend and frontend configuration. Example files are provided in the repository to make this easy.

    • Backend Configuration: From the project root, run:

      cp backend/env.template backend/.env

      (Note: The default values in the example file are ready for local development. You do not need to change anything).

    • Frontend Configuration: From the project root, run:

      cp frontend/env.template frontend/.env

      (Note: This file tells the frontend where to find the backend API, which is pre-configured for this Docker setup).

  3. Build the Backend Application This is a required one-time step. Make sure you have Docker installed and running on your system before proceeding. The backend will be containerized later, and the build process assumes Docker is available. The Docker build process needs the compiled Java application (the .jar file) to exist.

    Navigate into the backend directory and run the Maven wrapper to build the project:

    cd backend
    ./mvnw clean package
    cd .. 

    (Note: You only need to re-run this command if you make changes to the backend's pom.xml dependencies or want to create a new final build).

  4. Build and Run the Full Application with Docker Now, from the project root directory, you can start the entire application stack (frontend, backend, and database) with a single command.

    docker-compose up --build
    • This command might take a few minutes the first time you run it, as it needs to download the necessary base images and build your application.
    • --build ensures that fresh Docker images are created for the frontend and backend.
  5. Access the Application Once the containers are up and running, your application will be available at:


Development Workflow

  • Hot-Reloading: This setup is configured for hot-reloading. Any changes you make to the frontend or backend source code will automatically be detected, and the relevant service will restart or refresh in your browser.
  • Stopping the Application: To stop all running services, press Ctrl + C in the terminal where docker-compose is running.
  • Running in the Background: To run the services in the background (detached mode), use:
    docker-compose up -d
  • Viewing Logs: To view the logs from the running services (especially in detached mode), use:
    docker-compose logs -f
  • Stopping Detached Services:
    docker-compose down

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages