A goal tracking app with completion status and filtering
Goal Tracker is a full-stack web application that helps users create, track, and manage their personal goals. Built with React and Node.js, it features user authentication, goal management, and completion status tracking and filtering.
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- npm (comes with Node.js)
- MongoDB (local installation or MongoDB Atlas account)
Clone the repository and install dependencies for both frontend and backend:
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Navigate to the backend directory and create a
.envfile:cd backend cp .env.example .env -
Open the
.envfile and update the following variables:MONGODB_URI: Your MongoDB connection stringJWT_SECRET: A secret key for JWT tokens (use a strong, random string)GOOGLE_CLIENT_ID: Your Google OAuth client ID (optional, for Google login)GOOGLE_CLIENT_SECRET: Your Google OAuth client secret (optional)
-
Navigate to the frontend directory and create a
.envfile:cd frontend cp .env.example .env -
Update the environment variables as needed (typically the backend API URL).
You'll need to run both the backend and frontend servers:
-
Start the backend server:
cd backend npm run devThe backend will run on http://localhost:5000
-
In a new terminal, start the frontend server:
cd frontend npm run devThe frontend will run on http://localhost:5173
-
Open your browser and navigate to http://localhost:5173
Navigate to the backend directory and run:
cd backend
npm test
To run tests in watch mode:
npm run test:watch
- Register: Create a new account using the registration form
- Login: Sign in with your credentials or use Google OAuth
- Create Goals: Add new goals with descriptive text
- Completion Status Tracking: Monitor and update your goals' statuses
- Manage Goals: Edit or delete goals as needed
goal-app/
├── backend/ # Node.js Express server
│ ├── controllers/ # Route controllers
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── middleware/ # Custom middleware
│ └── tests/ # Backend tests
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── context/ # React context
│ │ └── services/ # API services
│ └── public/ # Static files
└── README.md
- Frontend: React, TypeScript, Vite, Tailwind CSS, Axios
- Backend: Node.js, Express, MongoDB, Mongoose
- Authentication: JWT, Google OAuth
- Testing: Jest
This project is licensed under the MIT License - see the LICENSE file for details.