Zendo
A full-stack task management site. Built with GO and Next.js
Install / Use
/learn @onosejoor/ZendoREADME
Zendo: Streamlined Task & Project Management
Organize your work, track progress, and boost productivity with Zendo, a powerful and intuitive task management application. Built with a robust Go backend and a modern Next.js frontend, Zendo provides a seamless experience for individuals and teams to manage tasks and projects efficiently.
✨ Features
- User Authentication: Secure user registration, login, and session management using JWT.
- Email Verification: Ensures account security and authenticity through email verification links.
- Google OAuth2 Integration: Seamless sign-in experience using Google accounts.
- Task Management: Create, view, update, and delete tasks. Add and manage subtasks within larger tasks. Set due dates and track task status (pending, in-progress, completed). Receive automated email reminders for upcoming task due dates.
- Project Management: Organize tasks into projects for better structuring. View all tasks associated with a specific project. Create, update, and delete projects.
- Team Collaboration: Create teams, invite members with specific roles (owner, admin, member), and manage team-specific tasks and projects.
- Dashboard & Analytics: Overview of total tasks, total projects, completion rate, and tasks due today.
- User Profile Management: Update username and avatar.
- Data Caching: Utilizes Redis for efficient data retrieval and improved performance.
- Atomic Operations: Employs MongoDB transactions for reliable data consistency (e.g., when creating/deleting tasks within projects).
- Prometheus Metrics: Exposes metrics for monitoring HTTP requests, database operations, Redis interactions, cron jobs, and user/project/task creation counts.
🛠️ Technologies Used
| Category | Technology | Description | Link |
| :------- | :----------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- |
| Backend | | Primary server-side language for robust API development. | go.dev |
| |
| Fast, Express-inspired web framework for Go. | gofiber.io |
| |
| NoSQL database for flexible and scalable data storage. | mongodb.com |
| |
| Official MongoDB driver for Go. | github.com/mongodb/mongo-go-driver |
| |
| An in-memory data structure store, used as a cache and message broker. | redis.io |
| |
| Popular Redis client for Go. | github.com/redis/go-redis |
| |
| Library for scheduling recurring tasks (e.g., email reminders). | github.com/go-co-op/gocron |
| |
| JSON Web Tokens for secure authentication and authorization. | github.com/golang-jwt/jwt |
| |
| Password hashing for user security. | pkg.go.dev/golang.org/x/crypto/bcrypt |
| |
| Cloud-based image and video management for avatar uploads. | github.com/cloudinary/cloudinary-go |
| |
| Loads environment variables from
.env files. | github.com/joho/godotenv |
| | | Struct and field validation for Go. | github.com/go-playground/validator |
| |
| Go package for sending emails. | github.com/go-mail/mail |
| |
| Open-source monitoring system for metrics collection and alerting. | prometheus.io |
| Frontend |
| React framework for server-side rendering and static site generation. | nextjs.org |
| |
| JavaScript library for building interactive user interfaces. | react.dev |
| |
| Superset of JavaScript for type safety and improved developer experience. | typescriptlang.org |
| |
| Utility-first CSS framework for rapid UI development. | tailwindcss.com |
| |
| React Hooks for data fetching with caching, revalidation, and focus-on-mount. | swr.vercel.app |
| |
| Reusable UI components for consistent design. | ui.shadcn.com |
| |
| Promise-based HTTP client for making API requests. | axios-http.com |
| |
| A library of simply beautiful open-source icons. | lucide.dev |
🚀 Getting Started
Follow these steps to set up and run Zendo on your local machine.
Prerequisites
Before you begin, ensure you have the following installed:
- Go: Version 1.22 or higher.
- Node.js: (v18 or higher) and npm/yarn for the frontend.
- MongoDB: A running MongoDB instance. You can use a local installation or a cloud-based service like MongoDB Atlas.
- Redis: A running Redis instance. For development, a local setup is fine; for production, consider a managed service like Upstash.
- Cloudinary Account: Required for image uploads (e.g., user avatars).
- Gmail Account: For sending email verification and task reminder emails. You'll need an App Password if using Gmail directly.
Installation
-
Clone the Repository:
git clone https://github.com/onosejoor/zendo.git cd zendo -
Navigate to the Server Directory and Install Dependencies:
cd server go mod tidy -
Navigate to the Client Directory and Install Dependencies:
cd ../client npm install # or yarn install
Environment Variables
Before running the application, set up the following environment variables in a .env file in both the server and client directories.
For server/.env:
PORT=8080
DATABASE=zendo_db_name
MONGO_URI="mongodb+srv://<username>:<password>@<cluster-url>/<db-name>?retryWrites=true&w=majority"
REDIS_UPSTASH_URL="rediss://<username>:<password>@<host>:<port>"
ACCESS_SECRET="your_jwt_access_secret"
JWT_SECRET="your_jwt_refresh_secret" # This is used for refresh token and email secret
EMAIL="your_email@gmail.com"
APP_PASSWORD="your_gmail_app_password" # Generated from Google Account Security
FRONTEND_URL="http://localhost:3000" # Or your deployed frontend URL
CLIENT_URL="http://localhost:3000" # Or your deployed frontend URL
ENVIRONMENT="development" # or "production"
# Optional: Cloudinary for avatar uploads
CLOUDINARY_URL="cloudinary://<api_key>:<api_secret>@<cloud_name>"
UPLOAD_PRESET="your_cloudinary_upload_preset"
# Optional: Google OAuth
G_CLIENT_ID="your_google_client_id"
G_CLIENT_SECRET="your_google_client_secret"
G_REDIRECT="http://localhost:8080/auth/callback"
# Optional: Prometheus Basic Auth
METRICS_USERNAME="metricsuser"
METRICS_PASSWORD="metricspassword"
For client/.env.local:
NEXT_PUBLIC_SERVER_URL="http://localhost:8080" # Your backend server URL
NEXT_PUBLIC_BACKUP_SERVER_URL="http://localhost:8080" # Backup backend server URL (can be same as primary for local)
Running the Application
-
Start the Backend Server: Navigate to the
serverdirectory and run:go run main.goThe server will start on
http://localhost:8080(or your specifiedPORT). -
Start the Frontend Client: Open a new terminal, navigate to the
clientdirectory and run:
