{"id":26380682,"url":"https://github.com/nramc/thirukkural-api","last_synced_at":"2025-03-17T05:33:01.234Z","repository":{"id":261385352,"uuid":"884149720","full_name":"nramc/thirukkural-api","owner":"nramc","description":"Connecting ancient Tamil philosophy with today’s digital landscape. Explore the ancient wisdom of Thirukkural, a classic Tamil text consisting of 1,330 couplets or Kurals, dealing with various aspects of life and morality.","archived":false,"fork":false,"pushed_at":"2025-03-11T19:32:51.000Z","size":717,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T20:31:43.367Z","etag":null,"topics":["kural","kural-of-the-day","serverless-functions","thirukkural","thurukkural-api","vercel-serverless-functions"],"latest_commit_sha":null,"homepage":"https://tamil-kural-api.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/nramc.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}},"created_at":"2024-11-06T08:32:58.000Z","updated_at":"2025-03-04T17:07:16.000Z","dependencies_parsed_at":"2024-12-16T16:28:31.435Z","dependency_job_id":"3d4f172e-016b-40cf-b002-8caf81686799","html_url":"https://github.com/nramc/thirukkural-api","commit_stats":null,"previous_names":["nramc/thirukkural-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nramc%2Fthirukkural-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nramc%2Fthirukkural-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nramc%2Fthirukkural-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nramc%2Fthirukkural-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nramc","download_url":"https://codeload.github.com/nramc/thirukkural-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243981552,"owners_count":20378590,"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":["kural","kural-of-the-day","serverless-functions","thirukkural","thurukkural-api","vercel-serverless-functions"],"created_at":"2025-03-17T05:32:56.083Z","updated_at":"2025-03-17T05:33:01.202Z","avatar_url":"https://github.com/nramc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thirukkural API\n\n\u003e Connecting ancient Tamil philosophy with today’s digital landscape.\n\n[![Website](https://img.shields.io/badge/website-online-brightgreen.svg)](https://tamil-kural-api.vercel.app/)\n\nWelcome to the Thirukkural API project!\n\nThis project provides a simple REST API to access Thirukkural verses, using a serverless function deployed on Vercel.\nAdditionally, it includes a React-based frontend to display a random \"Kural of the Day\" and information about how to use\nthe API.\n\n## Features\n\n- **Kural of the Day**: Displays a random Thirukkural verse with its meaning in multiple languages.\n- **REST API**: A simple serverless API that returns requested Kural in JSON format.\n- **Modern Web Technology**: Built using TypeScript, React, and Vercel's serverless architecture.\n\n## Getting Started\n\n### Prerequisites\n\nMake sure you have the following installed on your local machine:\n\n- **Node.js** (version 20.x or higher)\n- **npm** or **yarn**\n- **Vercel CLI** (for deployment)\n\n### Installation\n\n1. **Clone the Repository**\n\n   ```bash\n   git clone https://github.com/nramc/thirukkural-api.git\n   cd thirukkural-api\n    ```\n\n2. **Install Dependencies**\n\n   ```bash\n   npm install\n   or\n   yarn install\n   ```\n\n3. **Run the Project Locally**\n\n   ```bash\n   npm run dev\n   ```\n\n4. Your application will be available at [http://localhost:3000](http://localhost:3000)\n\n## Project Structure\n\n- **/public/data/kurals.json**: Contains the full list of Thirukkural verses in JSON format.\n- **/services/KuralService.ts**: A service file that loads and retrieves Kurals.\n- **/api/kural/**: A serverless function that returns a requested Kural as JSON.\n- **/api/daily/**: A serverless function that returns a Kural of the day as JSON.\n- **/api/random/**: A serverless function that returns a random Kural as JSON.\n- **/pages/index.tsx**: The main React component for the homepage.\n\n## Usage\n\n### Kural of the Day API\n\nYou can use the following endpoint to get Thirukkural of the day:\n\n```http request\nGET https://tamil-kural-api.vercel.app/api/daily\n```\n\nExample Response\n\n```json\n{\n  \"chapter\": \"கடவுள் வாழ்த்து\",\n  \"kural\": [\n    \"அகர முதல எழுத்தெல்லாம் ஆதி\",\n    \"பகவன் முதற்றே உலகு.\"\n  ],\n  \"number\": 1,\n  \"section\": \"அறத்துப்பால்\",\n  \"meaning\": {\n    \"ta_mu_va\": \"மு.வ : எழுத்துக்கள் எல்லாம் அகரத்தை அடிப்படையாக கொண்டிருக்கின்றன. அதுபோல உலகம் கடவுளை அடிப்படையாக கொண்டிருக்கிறது.\",\n    \"ta_salamon\": \"சாலமன் பாப்பையா : எழுத்துக்கள் எல்லாம் அகரத்தில் தொடங்குகின்றன; (அது போல) உலகம் கடவுளில் தொடங்குகிறது.\",\n    \"en\": \"As the letter A is the first of all letters, so the eternal God is first in the world.\"\n  }\n}\n```\n\n### Kural API\n\nYou can use the following endpoint to get Thirukkural by kural id(1 \u003c= id \u003c= 1330):\n\n```http request\nGET https://tamil-kural-api.vercel.app/api/kural/{id}\n```\n\nExample\n\n```http request\nGET https://tamil-kural-api.vercel.app/api/kural/1\n```\n\n```json\n{\n  \"chapter\": \"கடவுள் வாழ்த்து\",\n  \"kural\": [\n    \"அகர முதல எழுத்தெல்லாம் ஆதி\",\n    \"பகவன் முதற்றே உலகு.\"\n  ],\n  \"number\": 1,\n  \"section\": \"அறத்துப்பால்\",\n  \"meaning\": {\n    \"ta_mu_va\": \"மு.வ : எழுத்துக்கள் எல்லாம் அகரத்தை அடிப்படையாக கொண்டிருக்கின்றன. அதுபோல உலகம் கடவுளை அடிப்படையாக கொண்டிருக்கிறது.\",\n    \"ta_salamon\": \"சாலமன் பாப்பையா : எழுத்துக்கள் எல்லாம் அகரத்தில் தொடங்குகின்றன; (அது போல) உலகம் கடவுளில் தொடங்குகிறது.\",\n    \"en\": \"As the letter A is the first of all letters, so the eternal God is first in the world.\"\n  }\n}\n```\n\n### Random Kural API\n\nYou can use the following endpoint to get random Thirukkural:\n\n```http request\nGET https://tamil-kural-api.vercel.app/api/random\n```\n\nExample Response\n\n```json\n{\n  \"chapter\": \"கடவுள் வாழ்த்து\",\n  \"kural\": [\n    \"அகர முதல எழுத்தெல்லாம் ஆதி\",\n    \"பகவன் முதற்றே உலகு.\"\n  ],\n  \"number\": 1,\n  \"section\": \"அறத்துப்பால்\",\n  \"meaning\": {\n    \"ta_mu_va\": \"மு.வ : எழுத்துக்கள் எல்லாம் அகரத்தை அடிப்படையாக கொண்டிருக்கின்றன. அதுபோல உலகம் கடவுளை அடிப்படையாக கொண்டிருக்கிறது.\",\n    \"ta_salamon\": \"சாலமன் பாப்பையா : எழுத்துக்கள் எல்லாம் அகரத்தில் தொடங்குகின்றன; (அது போல) உலகம் கடவுளில் தொடங்குகிறது.\",\n    \"en\": \"As the letter A is the first of all letters, so the eternal God is first in the world.\"\n  }\n}\n```\n\n## Deployment\n\nYou can deploy this project on Vercel with the following steps:\n\n1. **Login to Vercel**\n\n   ```bash\n   vercel login\n   ```\n\n2. **Deploy the Project**\n\n   ```bash\n      vercel \n   ```\n\n3. Follow the prompts to complete the deployment.\n\n## Technologies Used\n\n- [React](https://react.dev/): For the frontend\n- [TypeScript](https://www.typescriptlang.org/): For type-safe code\n- [Vercel](https://vercel.com/): For serverless deployment\n- [Node.js](https://nodejs.org/): Backend runtime for the serverless function\n- [Renovate](https://docs.renovatebot.com/): Automated dependency updates\n\n## Contribution\n\nAny contributions you make are **greatly appreciated**.\n\nIf you like the project and have a suggestion that would make this better, please fork the repo and create a pull\nrequest.\nYou can also simply open an issue with the tag \"enhancement\".\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat: Add the AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is open-source and available under the MIT License.\n\n## Contact\n\nRamachandran\nNellaiyappan [Website](https://github.com/nramc) | [Twitter](https://twitter.com/ram_n_74) | [E-Mail](mailto:ramachandrannellai@gmail.com)\n\n## Credits\n\nSincere Thanks to following open source community for their wonderful efforts to make our life much easier.\n\n- [Vercel](https://vercel.com/)\n- [Next.js](https://nextjs.org/)\n\n## Show your support\n\nGive a ⭐️ if you like this project!\n\n**Enjoy using the Thirukkural API and spreading the wisdom of Thirukkural!**\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnramc%2Fthirukkural-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnramc%2Fthirukkural-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnramc%2Fthirukkural-api/lists"}