- Project Overview
- Deployment
- Live Demo
- Tech Stack
- Project Architecture
- Features
- Installation & Setup
- Project Structure
- Frontend Architecture
- State Management
- Routing
- Styling & UI
GoalSetter is a comprehensive personal goal tracking application built with the MERN stack (MongoDB, Express.js, React.js, Node.js). It allows users to create, manage, and track their personal goals with an intuitive category-based organization system.
- Platform: Render.com
- URL: https://goalsetter-v1.onrender.com
- Environment: Production
- Database: MongoDB Atlas
- Platform: Netlify
- URL: https://goalsetter-arpanvala.netlify.app/
- Build Command:
npm run build - Publish Directory:
dist
- Personal Goal Management: Create, update, and delete goals with priority levels and due dates
- Category Organization: Organize goals into custom categories for better management
- Dashboard Analytics: Visual statistics showing goal progress and completion rates
- User Authentication: Secure login/register system with JWT tokens
- Responsive Design: Mobile-friendly interface built with Tailwind CSS
- Frontend: https://goalsetter-arpanvala.netlify.app/
- Backend API: https://goalsetter-v1.onrender.com
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (JSON Web Tokens)
- Password Hashing: bcryptjs
- CORS: Cross-Origin Resource Sharing enabled
- Environment: dotenv for configuration
- Framework: React.js 19.1.0
- Build Tool: Vite
- State Management: Redux Toolkit
- Routing: React Router DOM
- HTTP Client: Axios
- Styling: Tailwind CSS
- UI Components: Headless UI, Lucide React Icons
- Notifications: React Toastify
GoalSetter/
βββ backend/ # Express.js API server
β βββ config/ # Database configuration
β βββ controllers/ # Route handlers
β βββ middleware/ # Custom middleware
β βββ models/ # MongoDB schemas
β βββ routes/ # API routes
β βββ server.js # Main server file
βββ frontend/ # React.js application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ features/ # Redux slices and services
β β βββ pages/ # Page components
β β βββ app/ # Redux store configuration
β βββ public/ # Static assets
βββ package.json # Root package configuration
-
User Authentication
- User registration and login
- JWT-based session management
- Secure password hashing
-
Goal Management
- Create, read, update, delete goals
- Set priority levels (High, Medium, Low)
- Set due dates with validation
- Mark goals as completed/incomplete
-
Category Management
- Create custom categories
- Rename and delete categories
- Organize goals by categories
-
Dashboard Analytics
- Total categories count
- Total goals count
- Completed goals count
- Due goals count
- Category-wise progress tracking
-
User Experience
- Responsive design for all devices
- Loading states and error handling
- Toast notifications for user feedback
- Intuitive navigation
- Node.js (v16 or higher)
- MongoDB database
- Git
-
Clone the repository
git clone <repository-url> cd GoalSetter
-
Install dependencies
npm install
-
Environment Configuration Create a
.envfile in the root directory:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key
-
Start the server
npm start # or for development with nodemon npm run dev
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Start development server
npm run dev
-
Build for production
npm run build
backend/
βββ config/
β βββ db.js # MongoDB connection configuration
βββ controllers/
β βββ userController.js # User authentication logic
β βββ goalController.js # Goal CRUD operations
β βββ categoryController.js # Category CRUD operations
βββ middleware/
β βββ authMiddleware.js # JWT authentication middleware
β βββ errorMiddleware.js # Global error handling
βββ models/
β βββ userModel.js # User schema
β βββ goalModel.js # Goal schema
β βββ categoryModel.js # Category schema
βββ routes/
β βββ userRoutes.js # User authentication routes
β βββ goalRoutes.js # Goal management routes
β βββ categoryRoutes.js # Category management routes
βββ server.js # Main server entry point
frontend/src/
βββ app/
β βββ store.js # Redux store configuration
βββ components/
β βββ CategoryList.jsx # Category display component
β βββ CategoryModel.jsx # Category creation modal
β βββ DeleteModal.jsx # Confirmation modal
β βββ Loading.jsx # Loading component
β βββ Navbar.jsx # Navigation component
β βββ RenameCategoryModal.jsx # Category rename modal
βββ features/
β βββ auth/
β β βββ authService.js # Authentication API calls
β β βββ authSlice.js # Redux auth state management
β βββ categories/
β β βββ categoryService.js # Category API calls
β β βββ categorySlice.js # Redux category state
β βββ goals/
β βββ goalService.js # Goal API calls
β βββ goalSlice.js # Redux goal state management
βββ pages/
β βββ AddGoalPage.jsx # Goal creation page
β βββ CategoryPage.jsx # Category detail page
β βββ Dashboard.jsx # Main dashboard
β βββ EditGoalPage.jsx # Goal editing page
β βββ HomePage.jsx # Landing page
β βββ LoginPage.jsx # User login
β βββ RegisterPage.jsx # User registration
β βββ NotFound404.jsx # 404 error page
βββ App.jsx # Main app component
βββ main.jsx # App entry point
The application uses Redux Toolkit for centralized state management with three main slices:
-
Auth Slice (
authSlice.js)- Manages user authentication state
- Handles login, register, and logout actions
- Stores user information and authentication status
-
Goals Slice (
goalSlice.js)- Manages goal-related state
- Handles CRUD operations for goals
- Tracks loading states and errors
-
Categories Slice (
categorySlice.js)- Manages category-related state
- Handles CRUD operations for categories
- Tracks loading states and errors
<Routes>
<Route path="/" element={<HomePage/>} />
<Route path="/login" element={<LoginPage/>} />
<Route path="/register" element={<RegisterPage/>} />
<Route path="/dashboard" element={<Dashboard/>}/>
<Route path="/category/:id" element={<CategoryPage/>} />
<Route path="/add-goal" element={<AddGoalPage/>} />
<Route path="/edit/:id" element={<EditGoalPage/>}/>
<Route path="*" element={<NotFound404/>}/>
</Routes>The application uses Redux Toolkit's configureStore with the following configuration:
const store = configureStore({
reducer: {
auth: authReducer,
goals: goalReducer,
categories: categoryReducer
}
})All API calls are handled using Redux Toolkit's createAsyncThunk for:
- User authentication (register, login, logout)
- Goal operations (create, read, update, delete)
- Category operations (create, read, update, delete)
/- Landing page/login- User login/register- User registration
/dashboard- Main dashboard with statistics/category/:id- Category detail page/add-goal- Create new goal/edit/:id- Edit existing goal
*- 404 Not Found page
- Framework: Tailwind CSS for utility-first styling
- Icons: Lucide React for consistent iconography
- Components: Headless UI for accessible components
- Responsive: Mobile-first responsive design
- Clean and modern interface
- Consistent color scheme (violet/blue theme)
- Smooth animations and transitions
- Loading states and error handling
- Toast notifications for user feedback
Arpan Vala - Personal goal tracking application built with MERN stack.