diff --git a/AGENTS.md b/AGENTS.md index 91c4a85..76955ce 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -61,7 +61,9 @@ LOCAL_DEV_MODE="true" rm deno-x86_64-unknown-linux-gnu.zip ``` -Ensure the `deno` executable is available in your system's PATH. The above instructions place it in `/usr/local/bin/`, which is typically included in the PATH. +Ensure the `deno` executable is available in your system's PATH. The above +instructions place it in `/usr/local/bin/`, which is typically included in the +PATH. 2. Clone repository and navigate to project directory 3. Set up environment variables (copy `.env.example` to `.env`) @@ -81,7 +83,9 @@ Ensure the `deno` executable is available in your system's PATH. The above instr 2. Run `deno task check` to validate code quality 3. Test with `deno task test` and `deno task e2e` 4. Deno KV handles data persistence automatically -5. **File-Level Validation**: When coding, ensure compliance by running the following commands on the specific file being modified (replace `routes/index.tsx` with your file path): +5. **File-Level Validation**: When coding, ensure compliance by running the + following commands on the specific file being modified (replace + `routes/index.tsx` with your file path): ```bash deno check routes/index.tsx deno fmt routes/index.tsx @@ -154,4 +158,3 @@ Ensure the `deno` executable is available in your system's PATH. The above instr - Follow OWASP security guidelines - Use local authentication to avoid external dependencies - Regular security audits and dependency updates - diff --git a/TODO.md b/TODO.md index 37b41a6..b9a09fe 100644 --- a/TODO.md +++ b/TODO.md @@ -1,68 +1,34 @@ -# TODO - Deno Check Errors +# Project TODO List -## TypeScript Errors Found (34 total) +This document outlines the remaining tasks, incomplete features, and future development plans for the application. -### Primary Issue: Missing Playwright Dependency -Multiple files have `TS2307: Import "@playwright/test" not a dependency and not in import map` +## High Priority +- **Implement Payment Processing**: The current rent payment system in `routes/tenant/rent/pay/index.tsx` is a placeholder. It needs to be fully implemented with a payment provider like Stripe to handle real transactions securely. -**Affected Files:** -- tests/e2e/document-api.spec.ts:1:36 -- tests/e2e/documents.spec.ts:1:36 -- tests/e2e/financial-api.spec.ts:1:36 -- tests/e2e/financial-ui.spec.ts:1:36 -- tests/e2e/guest-home.spec.ts:1:36 -- tests/e2e/helpers.ts:1:36 -- tests/e2e/invite-tenant.spec.ts:1:36 -- tests/e2e/landlord-dashboard.spec.ts:1:36 -- tests/e2e/landlord-messages.spec.ts:1:36 -- tests/e2e/landlord-onboarding.spec.ts:1:36 -- tests/e2e/multi-property.spec.ts:1:36 -- tests/e2e/onboarding.spec.ts:1:36 -- tests/e2e/reminders.spec.ts:1:36 -- tests/e2e/tenant-dashboard.spec.ts:1:36 +## Backend & API +- **Add Well-Known Endpoint**: Implement a `/.well-known/acme-challenge/:token` endpoint in `main.ts` to support services like Let's Encrypt for SSL certificate validation in production. +- **Enforce Database Constraints**: Ensure the `owner_id` field in the `AccessTokenResponse` interface is unique for each entry, as noted in `utils/database.ts`. This is crucial for maintaining data integrity. -### Secondary Issue: Implicit Any Types -`TS7031: Binding element` errors for untyped parameters: +## Feature Development +- **Complete Landlord Dashboard**: Flesh out all features under the `routes/landlord/` directory. This includes: + - Property management + - Tenant invitation and management (`islands/LandlordInviteTenant.tsx`) + - Messaging with tenants (`islands/LandlordMessageThreads.tsx`) + - Financial tracking and reporting +- **Complete Tenant Dashboard**: Finalize all features under the `routes/tenant/` directory. This includes: + - Viewing lease documents + - Tracking rent payments and financial obligations + - Messaging with landlords (`islands/TenantMessageThreads.tsx`) + - Managing settings (`islands/TenantSettings.tsx`) +- **Enhance User Onboarding**: Improve the onboarding flow for both new landlords and tenants in `routes/onboarding/`. +- **Develop User Profile Management**: Complete the user profile editing and management features in `routes/user-profile/`. -**Files with untyped `page` parameter:** -- tests/e2e/documents.spec.ts (lines 4:61, 29:63) -- tests/e2e/financial-ui.spec.ts (lines 4:60, 19:71) -- tests/e2e/guest-home.spec.ts (lines 4:26, 8:62, 24:58) -- tests/e2e/tenant-dashboard.spec.ts (lines 4:68, 18:67, 31:58, 50:68, 70:62) - -**Files with untyped `request` parameter:** -- tests/e2e/document-api.spec.ts (lines 4:75, 70:78) -- tests/e2e/financial-api.spec.ts (lines 4:68, 19:59, 40:65, 76:66) - -**Files with other untyped parameters:** -- tests/e2e/helpers.ts:7:8 - `({ now })` parameter -- tests/e2e/helpers.ts:82:31 - `({ id })` parameter - -## Required Actions - -1. **Install Playwright dependency:** - ```bash - deno add jsr:@playwright/test - ``` - -2. **Add proper TypeScript types for Playwright test parameters:** - - Import types from `@playwright/test` - - Type the `page`, `request`, `now`, and `id` parameters - -3. **Example fix pattern:** - ```typescript - import { Page, Request, TestInfo } from '@playwright/test'; - - test("example test", async ({ page }: { page: Page }) => { - // test code - }); - - test("api test", async ({ request }: { request: Request }) => { - // test code - }); - ``` - -4. **Run deno check again after fixes to verify all errors resolved:** - ```bash - deno check 2>&1 | head -c 5000 - ``` \ No newline at end of file +## Future Features & Refinements +- **AI/ML Feature Integration**: The advanced features found in the `islands/` directory need further development and integration into the user experience. This includes: + - `BrainStudy.tsx` + - `Quizzing.tsx` + - `ImageGenerater.tsx` + - `VoiceRecorder.tsx` +- **Calendar Functionality**: Expand the calendar features in `routes/calendar/` and improve the `islands/FinancialCalendar.tsx` component to be more interactive and informative. +- **Document Management**: Build out a robust document upload, storage, and sharing system for leases, notices, and other rental-related documents. +- **Reminders and Notifications**: Implement a system for sending automated reminders for rent payments, lease renewals, and other important events. diff --git a/deno.json b/deno.json index 05e8c35..ea4c61c 100755 --- a/deno.json +++ b/deno.json @@ -45,7 +45,8 @@ "gcs": "https://deno.land/x/google_cloud_storage/mod.ts", "google-cloud-storage": "npm:@google-cloud/storage", "gLog": "npm:google-logging-utils", - "cosmos": "npm:@azure/cosmos" + "cosmos": "npm:@azure/cosmos", + "@playwright/test": "npm:@playwright/test" }, "compilerOptions": { "lib": [ diff --git a/routes/tenant/settings/index.tsx b/routes/tenant/settings/index.tsx index f0cd4a3..1b400d3 100644 --- a/routes/tenant/settings/index.tsx +++ b/routes/tenant/settings/index.tsx @@ -61,46 +61,45 @@ export default define.page(function TenantSettingsPage({ }: { data: SettingsPageData; }) { - const { user, error } = data as SettingsPageData; - - if (error) { - return ( -
- Manage your notification and payment preferences. -
-+ Manage your notification and payment preferences. +
+