TaskLingo is a gamified productivity application that transforms daily tasks into an engaging experience. Users earn XP, build streaks, unlock achievements, and compete with friends in productivity leagues.
- Task Management: Create, track, and complete tasks with priority levels
- Gamification: Earn XP, level up, and unlock achievements
- Streak System: Build daily streaks for consistent productivity
- League Competition: Compete with others in weekly productivity leagues
- User Authentication: Secure login/signup with email verification
- Responsive Design: Works on all devices with a Duolingo-inspired UI
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB
- Authentication: JWT, bcrypt
- State Management: React Hooks
- Styling: Tailwind CSS, shadcn/ui components
- Animation: Framer Motion
- Testing: Jest, React Testing Library
- CI/CD: GitHub Actions
- Node.js 18+
- npm or yarn
- MongoDB database
-
Clone the repository: ```bash git clone https://github.com/yourusername/tasklingo.git cd tasklingo ```
-
Install dependencies: ```bash npm install ```
-
Set up environment variables:
- Copy
.env.example
to.env.local
- Fill in your MongoDB URI and JWT secret
- Copy
-
Run the development server: ```bash npm run dev ```
-
Open http://localhost:3000 in your browser.
MONGODB_URI
: MongoDB connection stringJWT_SECRET
: Secret key for JWT token generationEMAIL_HOST
: SMTP server for sending emailsEMAIL_PORT
: SMTP portEMAIL_USER
: SMTP usernameEMAIL_PASS
: SMTP passwordEMAIL_FROM
: Sender email address
``` tasklingo/ ├── app/ # Next.js App Router │ ├── api/ # API routes │ ├── dashboard/ # Dashboard pages │ └── page.tsx # Landing page ├── components/ # React components ├── lib/ # Utility functions │ ├── auth.ts # Authentication utilities │ ├── mongodb.ts # Database connection │ └── logger.ts # Logging service ├── public/ # Static assets ├── tests/ # Test files ├── middleware.ts # Next.js middleware └── next.config.mjs # Next.js configuration ```
The application is configured for deployment on Vercel:
- Connect your GitHub repository to Vercel
- Set up the required environment variables
- Deploy with the Vercel CLI or GitHub integration
Run tests with:
```bash npm test ```
The project uses GitHub Actions for CI/CD:
- Lint: Runs ESLint to check code quality
- Test: Runs Jest tests
- Build: Builds the Next.js application
- Deploy: Deploys to Vercel (production branch only)
- Password hashing with bcrypt
- JWT authentication with HTTP-only cookies
- CSRF protection
- Rate limiting
- Input validation
- Account lockout after failed login attempts
- Secure HTTP headers
- Custom logging system
- Performance monitoring
- Health check endpoint
- Error tracking
This project is licensed under the MIT License - see the LICENSE file for details. ```