Weekly Planner
A modern, interactive weekly timetable/schedule management application built with Next.js, React, TypeScript, and shadcn/ui. !GitHub !GitHub stars !GitHub forks ð Repository: https://github.com/R
About the Project
A modern, interactive weekly timetable/schedule management application built with Next.js, React, TypeScript, and shadcn/ui.
ð Repository: https://github.com/RasikhAli/weekly-planner
⨠Features
ð Interactive Timetable View
- Full weekly grid view with hourly time slots
- Visual time blocks for all your activities
- Current time indicator for easy tracking
- Responsive design for all screen sizes
ð¨ Activity Categories
Organize your activities into 5 distinct categories:
- ð Academic - Classes, tutorials, labs
- ðª Health & Fitness - Gym, workouts, sports
- ð¼ Work - Job shifts, meetings
- ð Personal - Sleep, personal time
- ð¥ Social - Events, gatherings
ð Dark Mode Support
- Toggle between light and dark themes
- Persists your preference automatically
- Smooth theme transitions
ð Timezone Support
- Sydney timezone as default
- Automatic local timezone detection
- Easy timezone switching
âï¸ Full CRUD Operations
- Add new subjects and activities
- Edit existing entries
- Delete unwanted items
- Reset to default schedule
ð¾ Data Persistence
- Automatic save to localStorage (works on static sites!)
- Export your timetable as JSON
- Import previously exported data
- No account required - data stays on your device
ð¯ Smart Features
- Overnight activity handling (e.g., sleep schedules)
- Auto-calculated time range based on activities
- Color-coded categories for quick identification
- Location tracking for each activity
ð Getting Started
Prerequisites
- Node.js 18+ or Bun
- npm, yarn, or bun package manager
Installation
-
Clone the repository
git clone https://github.com/RasikhAli/weekly-planner.git cd weekly-planner -
Install dependencies
npm install # or bun install -
Run the development server
npm run dev # or bun dev -
Open your browser Navigate to http://localhost:3000
Testing the Static Build Locally
To test the production build locally before deploying:
# Build the static site npm run build # Serve the static files (requires a static server) npx serve out # or npx http-server out
Then open http://localhost:3000 (or the port shown).
Note: All features (add, edit, delete, dark mode) work exactly the same in the static build because everything runs in your browser using localStorage!
ð¢ Deploying to Render
This application can be easily deployed to Render as a Static Site - completely free with no cold starts!
Why Static Site?
This app is fully client-side and uses localStorage for data persistence, making it perfect for static hosting:
- â Free hosting on Render
- â No cold starts - instant loading
- â Global CDN for fast delivery
- â No server maintenance required
- â Fully editable - all features work in the browser!
How Does Editing Work on a Static Site?
Great question! The app is fully editable even when deployed as a static site because:
- localStorage: All your timetable data is stored in your browser's localStorage
- Client-side JavaScript: All add/edit/delete operations run in your browser
- No backend needed: The server only delivers static files; your browser does all the work
What this means for you:
- âï¸ Add, edit, and delete activities - works perfectly!
- ð Dark mode toggle - persists between sessions
- ð¤ Export/Import data - full functionality
- â ï¸ Note: Data is stored per-device/browser. Clearing browser data will reset your timetable.
Prerequisites for Deployment
- A Render account
- Your code pushed to a GitHub repository
Deployment Steps
Option 1: Using Render Dashboard (Recommended)
-
Push your code to GitHub
git add . git commit -m "Prepare for deployment" git push origin main -
Create a new Static Site on Render
- Go to Render Dashboard
- Click "New +" â "Static Site"
- Connect your GitHub repository
- Select the
weekly-plannerrepository
-
Configure the Static Site
| Setting | Value | |---------|-------| | Name |
weekly-planner(or your preferred name) | | Region | Choose closest to your users | | Branch |main| | Root Directory | Leave empty | | Build Command |npm install && npm run build| | Publish Directory |out| -
Deploy
- Click "Create Static Site"
- Render will automatically build and deploy your app
- Wait for the deployment to complete (usually 1-2 minutes)
-
Access Your App
- Once deployed, your app will be available at:
https://your-app-name.onrender.com
- Once deployed, your app will be available at:
Option 2: Using render.yaml (Infrastructure as Code)
-
Create a
render.yamlfile in your project root:services: - type: web name: weekly-planner env: static region: oregon # or your preferred region branch: main buildCommand: npm install && npm run build staticPublishPath: out -
Push to GitHub
git add render.yaml git commit -m "Add Render configuration" git push origin main -
Create Blueprint on Render
- Go to Render Dashboard
- Click "New +" â "Blueprint"
- Connect your repository
- Render will detect the
render.yamland create the service
Important Notes for Render Deployment
-
Static Export: The app is configured with
output: "export"innext.config.tsfor static site generation. -
No Server Required: All data is stored in the browser's localStorage - no database or backend needed.
-
Custom Domains: You can add a custom domain in Render's settings for a professional URL.
-
Auto Deploy: Render automatically redeploys when you push changes to your repository.
Troubleshooting
| Issue | Solution |
|-------|----------|
| Build fails | Check build logs for errors; ensure all dependencies are in package.json |
| 404 errors | Ensure output: 'export' is set in next.config.ts and publish directory is out |
| Blank page | Check browser console for errors; ensure JavaScript is enabled |
| Data not persisting | localStorage works only on HTTPS; ensure you're accessing via https:// |
ð ï¸ Tech Stack
| Technology | Purpose | |------------|---------| | Next.js 16 | React framework with App Router | | React 19 | UI library | | TypeScript | Type safety | | Tailwind CSS 4 | Styling | | shadcn/ui | UI components | | Zustand | State management | | date-fns | Date utilities | | Lucide React | Icons |
ð Project Structure
weekly-planner/
âââ src/
â âââ app/ # Next.js App Router
â â âââ page.tsx # Main page component
â â âââ layout.tsx # Root layout
â â âââ globals.css # Global styles
â â âââ api/ # API routes
â âââ components/
â â âââ Timetable.tsx # Main timetable grid
â â âââ ClassCard.tsx # Activity card component
â â âââ EditModal.tsx # Edit/Add modal
â â âââ ui/ # shadcn/ui components
â âââ hooks/
â â âââ useTimetable.ts # Timetable state hook
â â âââ use-toast.ts # Toast notifications
â âââ lib/
â âââ timetable-data.ts # Data types & defaults
â âââ timetable-config.ts # Configuration
â âââ timezone-utils.ts # Timezone helpers
â âââ data-persistence.ts # Import/Export logic
âââ public/ # Static assets
âââ package.json
âââ tailwind.config.ts
âââ tsconfig.json
âï¸ Configuration
The application can be configured via src/lib/timetable-config.ts:
{ timezone: { defaultMode: 'sydney', // 'sydney' or 'local' sydneyTimezone: 'Australia/Sydney' }, display: { use12HourFormat: true, // 12h or 24h time format hourHeight: 80, // Grid hour height in pixels showCurrentTimeIndicator: true, showTodayLabel: true }, timeRange: { defaultStartHour: 8, defaultEndHour: 18, autoCalculateRange: true // Adjust based on activities }, storage: { storageKey: 'timetable-data', autoSave: true } }
ð Usage
Adding a New Activity
- Click the "+" button in the header
- Fill in the activity details:
- Subject name
- Activity type (Tutorial, Lab, etc.)
- Day and time
- Location
- Category
- Click Save
Editing an Activity
- Toggle Edit Mode using the edit button
- Click on any activity card
- Modify the details in the modal
- Click Save Changes
Deleting an Activity
- Enable Edit Mode
- Click the delete icon on the activity card
- Confirm the deletion
Exporting Data
- Click the Download icon
- A JSON file will be downloaded with your timetable data
Importing Data
- Click the Upload icon
- Select a previously exported JSON file
- Your timetable will be updated
ð¨ Customization
Adding New Categories
Edit src/lib/timetable-data.ts:
export const ACTIVITY_CATEGORIES: ActivityCategoryInfo[] = [ { id: 'your-category', label: 'Your Category', icon: 'IconName', defaultColors: ['#color1', '#color2'] }, // ... existing categories ];
Changing Default Schedule
Modify the defaultTimetableData object in src/lib/timetable-data.ts to set your default weekly schedule.
ð¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
ð License
This project is licensed under the MIT License - see the LICENSE file for details.
ð Acknowledgments
- shadcn/ui for the beautiful UI components
- Lucide for the icon set
- Tailwind CSS for the utility-first CSS framework
ð§ Contact
Rasikh Ali - GitHub
Project Link: https://github.com/RasikhAli/weekly-planner
Made with â¤ï¸ by Rasikh Ali
â Star this repo if you find it useful! â
Project Timeline
Technologies
External Links
Related Projects
Projects built with similar technologies.
Online Html Editor And Viewer
The Online HTML Editor and Viewer is a simple web application built with Flask that allows users to write and preview HTML code in real-time.
Examina Ai
Using AI, It transforms raw study materials into structured, verified examination sets with support for institutional export formats like Moodle XML.
Bulk Name Checker
A high-performance web application for entrepreneurs, marketers, and developers who need to validate name availability at scale.