Get your Task Tracker app running in 5 minutes!
The app is currently configured with a local MongoDB connection which won't work unless you have MongoDB installed locally. You have two options:
-
Create Free MongoDB Atlas Account
- Go to: https://www.mongodb.com/cloud/atlas/register
- Sign up (it's free, no credit card needed)
-
Create a Free Cluster
- Click "Build a Database"
- Choose "M0 FREE" tier
- Select your preferred region
- Click "Create Cluster" (takes 3-5 minutes)
-
Create Database User
- Go to "Database Access" (left sidebar)
- Click "Add New Database User"
- Choose "Password" authentication
- Username:
tasktracker - Password: Generate a strong password (save it!)
- Database User Privileges: "Atlas admin"
- Click "Add User"
-
Whitelist Your IP
- Go to "Network Access" (left sidebar)
- Click "Add IP Address"
- Click "Allow Access from Anywhere" (adds 0.0.0.0/0)
- Click "Confirm"
-
Get Connection String
- Go to "Database" (left sidebar)
- Click "Connect" on your cluster
- Choose "Connect your application"
- Copy the connection string
- It looks like:
mongodb+srv://tasktracker:<password>@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority
-
Update Your .env File
- Open
server/.env - Replace the
MONGODB_URIline with your connection string - Replace
<password>with your actual password - Add database name:
mongodb+srv://tasktracker:yourpassword@cluster0.xxxxx.mongodb.net/tasktracker?retryWrites=true&w=majority
- Open
If you prefer to run MongoDB on your machine:
Windows:
# Download from: https://www.mongodb.com/try/download/community
# Install and start MongoDB service
# The default connection string in .env should workMac:
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-communityLinux:
sudo apt-get install mongodb
sudo systemctl start mongodbOnce MongoDB is configured:
-
Install Dependencies (if not done already)
npm run install:all
-
Start Both Servers
npm run dev
This will start:
- Backend on http://localhost:5000
- Frontend on http://localhost:3000
-
Open Your Browser
- Go to http://localhost:3000
- Click "Register" to create an account
- Start managing your tasks!
-
Check Backend Health
- Open: http://localhost:5000/health
- Should see:
{"status":"ok",...}
-
Check Frontend
- Open: http://localhost:3000
- Should see the login page
-
Test Registration
- Click "Register"
- Fill in the form
- Should redirect to dashboard after successful registration
- Solution: Make sure you've updated
MONGODB_URIinserver/.env - Check if your IP is whitelisted in MongoDB Atlas
- Verify your password doesn't contain special characters that need URL encoding
- Solution: Run
npm installin the server directorycd server npm install cd ..
- Solution: Make sure backend is running on port 5000
- Check
client/.envhasREACT_APP_API_URL=http://localhost:5000/api
- Solution: Kill the process or change the port
# Windows PowerShell netstat -ano | findstr :5000 taskkill /PID <PID> /F # Mac/Linux lsof -ti:5000 | xargs kill -9
The app comes with these default settings in server/.env:
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/tasktracker # ⚠️ UPDATE THIS
JWT_SECRET=dev_secret_key_change_in_production_12345678
ALLOWED_ORIGINS=http://localhost:3000MONGODB_URI with your MongoDB Atlas connection string or local MongoDB URL.
After getting the app running:
- ✅ Test all features (register, login, create/edit/delete tasks)
- ✅ Read
README.mdfor full documentation - ✅ Read
DEPLOYMENT.mdwhen ready to deploy to production - ✅ Check
CHANGES.mdto see what was improved
- Development: The app auto-reloads when you make changes
- Backend logs: Check the terminal running the server for API logs
- Frontend errors: Open browser DevTools (F12) to see console errors
- Database: View your data in MongoDB Atlas dashboard
- Make sure Node.js version is 16 or higher:
node --version - Clear npm cache:
npm cache clean --force - Delete
node_modulesand reinstall:rm -rf node_modules server/node_modules client/node_modules npm run install:all
- Check if all environment files exist:
server/.env✓client/.env✓
- Check the error message carefully
- Search the error on Google/Stack Overflow
- Review the troubleshooting sections in README.md
- Open an issue on GitHub with:
- Error message
- Steps to reproduce
- Your environment (OS, Node version)
Happy Coding! 🎉