{"id":51493997,"url":"https://github.com/kiritocode1/ensiessay","last_synced_at":"2026-07-07T13:01:52.325Z","repository":{"id":326344859,"uuid":"1104720695","full_name":"kiritocode1/ensiessay","owner":"kiritocode1","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-03T20:44:16.000Z","size":126,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-11T13:57:48.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiritocode1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-26T15:41:31.000Z","updated_at":"2025-11-27T07:31:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kiritocode1/ensiessay","commit_stats":null,"previous_names":["kiritocode1/ensiessay"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kiritocode1/ensiessay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiritocode1%2Fensiessay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiritocode1%2Fensiessay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiritocode1%2Fensiessay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiritocode1%2Fensiessay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiritocode1","download_url":"https://codeload.github.com/kiritocode1/ensiessay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiritocode1%2Fensiessay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35228639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-07T13:01:48.273Z","updated_at":"2026-07-07T13:01:52.224Z","avatar_url":"https://github.com/kiritocode1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## EnsiEssay – Creator Intelligence Workspace\n\nEnsiEssay is an authenticated workspace for YouTube creators that turns channel data, comments, and market signals into an actionable \u0026quot;essay\u0026quot; on what to publish next. The motive is to move beyond dashboards and give a fast read on audience sentiment, content performance, and market direction in one place.\n\n## Architecture\n\n-   **App router layout**\n    -   `app/(auth)`: sign-in / sign-up surfaces using Better Auth.\n    -   `app/(app)`: authenticated workspace (`dashboard`, `comments`, `market`) behind a proxy guard.\n-   **Auth**\n    -   [`better-auth`](https://www.better-auth.com/) with a Google OAuth provider and YouTube scopes.\n    -   Server config + session helpers in `lib/auth/` and API route in `app/api/auth/[...better-auth]/route.ts`.\n-   **Effect-style service layer**\n    -   Pure, typed service modules in `lib/effect/` (`youtube.service.ts`, `comment-analysis.service.ts`, `market.service.ts`, `user-data.service.ts`) with mocked implementations.\n    -   A small `runtime` helper that is ready to be swapped to real [`effect`](https://effect.website) usage later.\n-   **Routing protection**\n    -   `proxy.ts` enforces that all `/(app)` routes require an authenticated session and redirects to `/(auth)/sign-in` otherwise.\n\n```mermaid\nflowchart LR\n    U[Visitor] --\u003e A[auth app]\n    A --\u003e|Google OAuth via Better Auth| B[Session in lib/auth/server]\n    B --\u003e P[proxy.ts guard]\n    P --\u003e|authenticated| W[workspace app]\n    P --\u003e|unauthenticated| A\n    W --\u003e D[Dashboard page]\n    W --\u003e C[Comments page]\n    W --\u003e M[Market page]\n    D \u0026 C \u0026 M --\u003e S[(lib/effect services)]\n    S --\u003e|mocked / future Effect| Y[youtube.service.ts, comment-analysis.service.ts, market.service.ts, user-data.service.ts]\n```\n\n## Packages\n\n-   **Runtime / framework**\n    -   `next` (App Router), `react`, `react-dom`.\n-   **Auth**\n    -   `better-auth` and `better-auth/next-js` for server + client adapters.\n-   **Environment**\n    -   `@t3-oss/env-core` and `zod` for a typed `env.ts` schema (Google OAuth keys, `NODE_ENV`, etc.).\n-   **Experiments / services**\n    -   `effect` (planned) for future effectful service implementations behind the existing typed interfaces in `lib/effect/`.\n\n## Setup\n\n1. **Install dependencies**\n\n    ```bash\n    pnpm install\n    ```\n\n2. **Environment variables**\n\n    Configure a `.env.local` compatible with `env.ts`:\n\n    - `NODE_ENV`\n    - `GOOGLE_CLIENT_ID`\n    - `GOOGLE_CLIENT_SECRET`\n    - Any additional Better Auth or YouTube-related secrets you introduce later.\n\n3. **Run the dev server**\n\n````bash\npnpm dev\n    ```\n\n    Then open `http://localhost:3000`.\n\n## Development notes\n\n-   Client-side auth flows use the Better Auth React client in `lib/auth/client.ts` from the `app/(auth)` pages.\n-   The `lib/effect/*` modules currently return mocked data; you can replace their internals with real Effect programs without changing the UI layer.\n-   Keep new modules typed and avoid `any` / `undefined` in TypeScript; extend the existing domain types instead.\n\n## Further reading\n\n-   `packages-and-setup.md`: short reference for core dependencies and pnpm commands.\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiritocode1%2Fensiessay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiritocode1%2Fensiessay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiritocode1%2Fensiessay/lists"}