Serenity Hub is a meditation and zen application designed specifically for stressed students. Built with React for the frontend and Flask for the backend, it helps users track and improve their wellness activities, such as focus time, meditation, and session completion.
- Displays total focus and meditation time in hours and minutes.
- Shows the current streak of consecutive days of activity.
- Displays the number of completed sessions.
- Shows weekly progress as a percentage increase from the previous week.
- Updates progress data every minute.
- Node.js (version 14 or later)
- npm (Node Package Manager)
- Python 3.x
- Flask
-
Clone the repository:
git clone https://github.com/silvanicholas/serenity-hub.git cd serenity-hub -
Install frontend dependencies:
cd frontend npm install -
Install backend dependencies:
Navigate to the backend directory and set up a virtual environment:
cd ../backend python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
-
Initialize the database:
python3 setup_db.py
This will create the necessary tables in the database.
-
Start the Flask server:
python3 run.py
The server will start on
http://localhost:5000.
-
Start the React development server:
cd ../frontend npm startThis will start the application on
http://localhost:3000.
- The application expects an authentication token stored in the browser's local storage under the key
token. Ensure this token is set for the application to fetch data successfully.
frontend/src/components/: This contains all our components/pages on the frontend, which includes each page's jsx file and css styling.frontend/src/components/Navbar/Navbar.jsx: The navigation bar component.backend: Contains the Flask application code.backend/routes: This includes our necessary routes, which consists of authentication, journals, and user progress.
- If you encounter a "Failed to fetch progress data" error, ensure that the backend server is running and accessible at
http://localhost:5000. - Check the browser's console for any additional error messages.