• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
jeffroche

jeffroche

weekly-sched

Public
Like
weekly-sched
Home
Code
5
backend
3
frontend
4
shared
1
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://jeffroche--20f21882843b11f09a1c0224a6c84d84.web.val.run
README.md

Weekly Schedule App

A React-based weekly schedule application for managing recurring responsibilities and delegating tasks with client-side routing using wouter.

Features

  • Manage Responsibilities: Create and manage recurring responsibilities with flexible scheduling
  • Delegate Tasks: Assign responsibilities to team members for specific weeks
  • Calendar View: Visual weekly calendar with navigation and task management
  • Client-Side Routing: Proper URLs for each page with browser back/forward support using wouter

Architecture

Frontend

  • React 18.2.0 with TypeScript
  • Wouter for client-side routing with URL support
  • TailwindCSS for styling
  • Modern, minimal design

Backend

  • Hono API framework
  • SQLite database
  • RESTful API endpoints
  • SPA routing support

Routes

  • / - Calendar view (default)
  • /responsibilities - Manage responsibilities
  • /delegation - Delegate tasks

Data Model

Responsibilities Table:

  • id, createdAt, updatedAt
  • name (string)
  • days (weekdays/weekends/every day)
  • startTime, endTime (nullable)
  • status (active/archived)

Tasks Table:

  • id, responsibilityId (foreign key)
  • date, owner (Jeff/Tara)
  • notes (text field)

Project Structure

β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”œβ”€β”€ migrations.ts
β”‚   β”‚   └── queries.ts
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ responsibilities.ts
β”‚   β”‚   └── tasks.ts
β”‚   └── index.ts
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ App.tsx
β”‚   β”‚   β”œβ”€β”€ ResponsibilitiesPage.tsx
β”‚   β”‚   β”œβ”€β”€ DelegationPage.tsx
β”‚   β”‚   └── CalendarPage.tsx
β”‚   β”œβ”€β”€ index.html
β”‚   └── index.tsx
└── shared/
    └── types.ts

Usage

The app consists of three main views:

1. Calendar View (Default)

  • Visual weekly calendar showing all assigned tasks
  • Navigate between weeks with Previous/Next buttons
  • Click "Current Week" to jump back to today
  • Click on any task to edit notes
  • Color-coded assignments (Jeff = blue, Tara = green)
  • Shows responsibility name, time, owner, and notes

2. Responsibilities Page

  • Create and manage recurring responsibilities
  • Set name, days (weekdays/weekends/every day), and optional time slots
  • Edit existing responsibilities
  • Archive responsibilities when no longer needed

3. Delegation Page

  • Assign responsibilities to team members for specific weeks
  • Select any week using the date picker
  • Grid view showing all responsibilities vs. days of the week
  • Only shows relevant days based on responsibility settings
  • Bulk save all assignments for the week

Getting Started

  1. Start by creating responsibilities in the "Responsibilities" page
  2. Use the "Delegation" page to assign tasks for upcoming weeks
  3. View and manage the schedule in the "Calendar" view

API Endpoints

  • GET /api/responsibilities - Get all active responsibilities
  • POST /api/responsibilities - Create new responsibility
  • PUT /api/responsibilities/:id - Update responsibility
  • DELETE /api/responsibilities/:id - Archive responsibility
  • GET /api/tasks/week?start=YYYY-MM-DD&end=YYYY-MM-DD - Get tasks for week
  • POST /api/tasks - Create new task assignment
  • PUT /api/tasks/:id - Update task (owner/notes)
  • PUT /api/tasks/by-responsibility/{responsibilityId}#{date} - Create or update task by responsibility and date (upsert)
  • DELETE /api/tasks/:id - Delete task assignment

Task Management

The app now supports a unified PUT endpoint for creating or updating tasks:

  • Endpoint: PUT /api/tasks/by-responsibility/{responsibilityId}#{date}
  • Format: The ID is formatted as {responsibilityId}#{date} (e.g., 1#2024-01-15)
  • Behavior: Creates a new task if it doesn't exist, updates if it does
  • Body: { "owner": "Jeff" | "Tara", "notes": "optional notes" }

This simplifies the delegation workflow by eliminating the need to check for existing tasks before creating or updating them.

HTTP
  • index.ts
    jeffroche--20…84.web.val.run
Code
backendfrontendsharedREADME.mdmain.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.