{"id":27818014,"url":"https://github.com/nunogois/dejavu","last_synced_at":"2026-05-05T20:41:30.895Z","repository":{"id":290619703,"uuid":"975053136","full_name":"nunogois/dejavu","owner":"nunogois","description":"Scans your OneDrive folder for .xlsx files and generates a dejavu.xlsx file in the same folder containing rows where a target column has duplicate values across those files.","archived":false,"fork":false,"pushed_at":"2025-04-29T18:15:51.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-29T19:26:05.567Z","etag":null,"topics":["nextjs","scanner","vercel","xlsx"],"latest_commit_sha":null,"homepage":"https://dejavu-psi.vercel.app","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/nunogois.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}},"created_at":"2025-04-29T17:53:56.000Z","updated_at":"2025-04-29T18:16:36.000Z","dependencies_parsed_at":"2025-04-29T19:26:08.459Z","dependency_job_id":"9b96c5ae-be6d-4f10-af3f-c69c7ef8cb0b","html_url":"https://github.com/nunogois/dejavu","commit_stats":null,"previous_names":["nunogois/dejavu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nunogois%2Fdejavu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nunogois%2Fdejavu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nunogois%2Fdejavu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nunogois%2Fdejavu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nunogois","download_url":"https://codeload.github.com/nunogois/dejavu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251900024,"owners_count":21662134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["nextjs","scanner","vercel","xlsx"],"created_at":"2025-05-01T15:36:28.363Z","updated_at":"2026-05-05T20:41:30.888Z","avatar_url":"https://github.com/nunogois.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌀 dejavu\n\n**dejavu** scans your OneDrive folder for `.xlsx` files and generates a `dejavu.xlsx` file containing rows where a specific column has duplicate values across those files.\n\n## 🔍 Example\n\nSuppose you want to detect duplicate rows by the `Client ID` column inside the folder `dv-A/dv-B`.\n\n- **Folder**: `dv-A/dv-B`\n- **Column**: `Client ID`\n\nYou have two ways to trigger a sync:\n\n### 🖱 Option 1: Use the UI\n\nVisit [https://dejavu-psi.vercel.app](https://dejavu-psi.vercel.app), sign in with your Microsoft account, and click **Sync**.\n\n### 🛠 Option 2: Manual API Call\n\n```\nGET https://dejavu-psi.vercel.app/api/sync?folder=dv-A/dv-B\u0026column=Client ID\n```\n\n- If authenticated in the browser, this uses your session.\n- If called from a script/server, you must provide a token (see below).\n\n## 🗓 Scheduled Syncs\n\nYou can automate duplicate detection using a token and your scheduler of choice.\n\n### 🔑 Step 1: Generate a Token\n\nVisit:\n\n👉 https://dejavu-psi.vercel.app/api/token\n\nYou’ll be prompted to authorize access to your OneDrive.\nThis will return a token — keep it safe, as it grants access to your files.\n\n---\n\n### 🔁 Step 2: Schedule Syncs\n\nUse the token to hit the `https://dejavu-psi.vercel.app/api/sync` endpoint.  \nYou must include:\n\n- **folder**: the OneDrive path to scan (e.g., `dv-A/dv-B`)\n- **column**: the target column header (e.g., `Client ID`)\n- **Authorization**: `Bearer YOUR_TOKEN`\n\n---\n\n### 🧪 Example: curl\n\n```sh\ncurl -X GET \\\n  'https://dejavu-psi.vercel.app/api/sync?folder=dv-A/dv-B\u0026column=Client ID' \\\n  -H 'Authorization: Bearer YOUR_TOKEN'\n```\n\n### ☁️ Example: Cloudflare Worker (Scheduled Cron Job)\n\n```js\nasync function syncReports(env) {\n  const url = new URL('https://dejavu-psi.vercel.app/api/sync')\n  url.searchParams.set('folder', env.FOLDER)\n  url.searchParams.set('is_shared_folder', '1')\n  url.searchParams.set('column', env.COLUMN)\n  url.searchParams.set('sheet', env.SHEET)\n  url.searchParams.set('file_filter', env.FILE_FILTER)\n  url.searchParams.set('output_file', env.OUTPUT_FILE)\n\n  const res = await fetch(url.toString(), {\n    method: 'GET',\n    headers: {\n      Authorization: `Bearer ${env.TOKEN}`\n    }\n  })\n\n  if (!res.ok) {\n    const errorText = await res.text()\n    console.error(`Failed to sync. Status: ${res.status}. Response:`, errorText)\n    return new Response('Failed to sync reports', { status: 500 })\n  }\n\n  const data = await res.json()\n\n  console.log('Successfully synced:', data.message)\n  return new Response(JSON.stringify(data), {\n    status: 200,\n    headers: { 'Content-Type': 'application/json' }\n  })\n}\n\nexport default {\n  async scheduled(event, env, ctx) {\n    return await syncReports(env)\n  },\n\n  async fetch(request, env, ctx) {\n    return await syncReports(env)\n  }\n}\n```\n\n🛠 Be sure to define the `FOLDER`, `COLUMN`, and `TOKEN` in your Cloudflare Worker environment variables.\n\n---\n\nThis is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nThis project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnunogois%2Fdejavu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnunogois%2Fdejavu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnunogois%2Fdejavu/lists"}