{"id":19258789,"url":"https://github.com/teableio/template-site","last_synced_at":"2025-04-21T16:30:33.565Z","repository":{"id":228747158,"uuid":"765040580","full_name":"teableio/template-site","owner":"teableio","description":"teable official template site","archived":false,"fork":false,"pushed_at":"2024-08-08T00:20:48.000Z","size":215,"stargazers_count":5,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T04:35:00.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://template.teable.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teableio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-02-29T07:05:16.000Z","updated_at":"2025-03-27T10:21:22.000Z","dependencies_parsed_at":"2024-03-20T09:44:09.749Z","dependency_job_id":null,"html_url":"https://github.com/teableio/template-site","commit_stats":null,"previous_names":["teableio/template-site"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teableio%2Ftemplate-site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teableio%2Ftemplate-site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teableio%2Ftemplate-site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teableio%2Ftemplate-site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teableio","download_url":"https://codeload.github.com/teableio/template-site/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250090609,"owners_count":21373216,"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":[],"created_at":"2024-11-09T19:14:23.341Z","updated_at":"2025-04-21T16:30:33.237Z","avatar_url":"https://github.com/teableio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\n## About This Project\nThis project is the [template center](https://template.teable.io) that teable is currently running, and because it is so simple, it is suitable for a novice demo\n\n### What This Project Contains\n\n- **Teable API Integration**: Practical examples of how to make API requests, filter data, and establish field mappings with Teable.\n- **Data Storage**: All data is stored within a Teable base, accessible via API.\n- **Simplified Codebase**: The [core request code](src/app/api.ts) is concise, spanning just a few dozen lines, and is straightforward to understand with detailed comments provided in the code.\n\n### Pages\n\nThe site comprises two main pages:\n- **[Home Page](src/app/page.tsx)**: The central hub of the template site.\n- **[Detail Page](src/app/t/[slug]/page.tsx)**: Individual detail pages for each template.\n\n## Getting Started\n\nTo get started with this project:\n1. Clone the repository to your local machine.\n2. Ensure you have Node.js installed to run the project locally.\n3. Install the dependencies with `pnpm install`.\n\n### Environment Setup\n\nTo run this project locally, you need to configure environment variables critical for connecting to Teable's API. Follow these steps to set up your environment:\n\n#### AUTH_TOKEN\n\nCreate a personal access token at [Teable Personal Access Tokens](https://app.teable.cn/setting/personal-access-token). Ensure you grant the necessary permissions for the token to interact with your Teable data.\n\n#### TABLE_ID and VIEW_ID\n\nvisit [Template Management](https://template.teable.io/t/recS2CiVjWak6EQ7vG7) template, and use it in your space.\n\nThen, enter the table copy the table id and view id.\n\u003e Navigate to your table within the Teable interface. In the URL, `tbl` followed by a series of characters indicates the `TABLE_ID`, and `viw` followed by characters represents the `VIEW_ID`. For example, in the URL `https://app.teable.io/base/bsecK4OyHBpinO4vvGR/tblvKxQjv7cEy43xxjB/viwLbdUyL9DQOprYlb2`, the `TABLE_ID` is `tblvKxQjv7cEy43xxjB` and the `VIEW_ID` is `viwLbdUyL9DQOprYlb2`.\n\n\n1. In the project's root directory, find the `.env.example` file.\n2. Copy `.env.example` and rename the copy to `.env.local`.\n3. Open `.env.local` and fill in the values for the following environment variables:\n```sh\nAUTH_TOKEN=your-auth-token\nTABLE_ID=the-table-id\nVIEW_ID=the-view-id\n```\n\n#### FIELD ID MAP\nCheck out [src/app/api.ts](src/app/api.ts) you will see this map and you should replace it to your own\nClick on the gear ⚙️ in the top right corner of the table and you will see the id of all the fields\n```code\n/**\n * A mapping of field names to their respective ID in Teable.\n * This ensures robustness in the application as it allows access to record data\n * via field IDs rather than names, which can change in the Teable UI without affecting the application.\n * **if you want to use it, you might to change the fieldIdMap to your own fieldIdMap**\n *\n */\nexport const fieldIdMap = {\n  name: \"fldjLW98cEIM1HPs725\",\n  description: \"fldYehDZnQa2zOIwYTW\",\n  baseId: \"flduDv4n46lFjjTtg53\",\n  cover: \"fldGvaTfxIt7BANmhAE\",\n  recommend: \"fldt47H4rjXaB2RYADb\",\n  tags: \"fldJT5IwA5AmhRFDjL0\",\n  shortCut: \"fldAyyj9nmgt5WPdyEE\",\n  inSiteAddress: \"fldXLcku2BHJ3paX4lN\",\n  doc: \"fldF6wHXFqhXIYpzr4R\",\n};\n\n```\n\n### Running the Project\nStart the development server with `pnpm start`.\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/deployment) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteableio%2Ftemplate-site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteableio%2Ftemplate-site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteableio%2Ftemplate-site/lists"}