-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a1e22be
Showing
41 changed files
with
5,803 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: build-test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Cache node modules | ||
uses: actions/[email protected] | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build-${{ env.cache-name }}- | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '18.x' | ||
- name: use yarn | ||
run: | | ||
yarn install | ||
yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: vercel-deploy | ||
|
||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Cache node modules | ||
uses: actions/[email protected] | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build-${{ env.cache-name }}- | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '18.x' | ||
- name: install vercel CLI | ||
run: yarn global add vercel | ||
- name: Deploy Project Vercel | ||
run: vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# PWA | ||
**/public/workbox-*.js | ||
**/public/workbox-*.js.map | ||
**/public/sw.js | ||
**/public/sw.js.map | ||
**/public/worker-*.js | ||
**/public/worker-*.js.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.cache | ||
package.json | ||
package-lock.json | ||
public | ||
LICENSE | ||
README.md | ||
public | ||
static | ||
yarn.lock | ||
out | ||
build | ||
node_modules | ||
.next | ||
.github | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"semi": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.vercel | ||
vendor | ||
composer.json | ||
composer.lock | ||
procfile | ||
app.json | ||
LICENSE | ||
README.md | ||
.github | ||
.gitignore | ||
test.js | ||
.env | ||
renovate.json | ||
dist | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2023 Santhosh Veer | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Tamil SMS | ||
|
||
![build-test](https://github.com/mskian/next-tamil-sms/workflows/build-test/badge.svg) | ||
|
||
Random Tamil Kavithai Collections - Tamil SMS Blog and kavithai index Database. | ||
|
||
> Tamil Kavithai index Database - kavithai and kadhal kavithai. | ||
⚛ React + Next JS | 🌩 Vercel | ||
|
||
## Features 🍔 | ||
|
||
- React + Next JS | ||
- Tailwind CSS | ||
- Power Packed with React and Next Modules | ||
- Next JS API Router for fetch Kavithai data | ||
- PWA Support | ||
- Vercel Cache | ||
|
||
## Installation 📦 | ||
|
||
- Clone this repo or Download | ||
|
||
```sh | ||
git clone https://github.com/mskian/next-tamil-sms | ||
cd next-tamil-sms | ||
yarn | ||
``` | ||
|
||
- Test the site | ||
|
||
```sh | ||
yarn dev | ||
``` | ||
|
||
- Build the site | ||
|
||
```sh | ||
yarn build | ||
``` | ||
|
||
- Test the production Build on Localhost | ||
|
||
```sh | ||
yarn start | ||
``` | ||
|
||
## Contributing 🙌 | ||
|
||
Your PR's are Welcome | ||
|
||
## LICENSE ☑ | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { NextResponse } from "next/server" | ||
|
||
const dummy_json = [{ | ||
id: "Data Not Found", | ||
content: "Data Not Found", | ||
}] | ||
|
||
export const fetchCache = 'force-no-store' | ||
export const revalidate = 0 | ||
export const dynamic = 'force-dynamic' | ||
|
||
export async function GET() { | ||
try { | ||
const str = process.env.KADHAL_URL | ||
const response = await fetch(str, { | ||
headers: { | ||
"User-Agent": | ||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", | ||
}, | ||
next: { revalidate: 0 } | ||
}) | ||
|
||
const kavithai_data = await response.json() | ||
|
||
if (response.status == 200) { | ||
return NextResponse.json(kavithai_data, { | ||
status: 200, | ||
headers: { | ||
"X-Frame-Options": "DENY", | ||
"X-XSS-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Strict-Transport-Security": "max-age=63072000", | ||
}, | ||
}) | ||
} else { | ||
return NextResponse.json(dummy_json, { | ||
status: 404, | ||
headers: { | ||
"X-Frame-Options": "DENY", | ||
"X-XSS-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Strict-Transport-Security": "max-age=63072000", | ||
}, | ||
}) | ||
} | ||
} catch (error) { | ||
return NextResponse.json(dummy_json, { | ||
status: 404, | ||
headers: { | ||
"X-Frame-Options": "DENY", | ||
"X-XSS-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Strict-Transport-Security": "max-age=63072000", | ||
}, | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { NextResponse } from "next/server" | ||
|
||
const dummy_json = [{ | ||
id: "Data Not Found", | ||
content: "Data Not Found", | ||
}] | ||
|
||
export const fetchCache = 'force-no-store' | ||
export const revalidate = 0 | ||
export const dynamic = 'force-dynamic' | ||
|
||
export async function GET() { | ||
try { | ||
const str = process.env.KAVITHAI_URL | ||
const response = await fetch(str, { | ||
headers: { | ||
"User-Agent": | ||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", | ||
}, | ||
next: { revalidate: 0 } | ||
}) | ||
|
||
const kavithai_data = await response.json() | ||
|
||
if (response.status == 200) { | ||
return NextResponse.json(kavithai_data, { | ||
status: 200, | ||
headers: { | ||
"X-Frame-Options": "DENY", | ||
"X-XSS-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Strict-Transport-Security": "max-age=63072000", | ||
}, | ||
}) | ||
} else { | ||
return NextResponse.json(dummy_json, { | ||
status: 404, | ||
headers: { | ||
"X-Frame-Options": "DENY", | ||
"X-XSS-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Strict-Transport-Security": "max-age=63072000", | ||
}, | ||
}) | ||
} | ||
} catch (error) { | ||
return NextResponse.json(dummy_json, { | ||
status: 404, | ||
headers: { | ||
"X-Frame-Options": "DENY", | ||
"X-XSS-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Strict-Transport-Security": "max-age=63072000", | ||
}, | ||
}) | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
body { | ||
font-size: 16px; | ||
font-family: 'Baloo Thambi 2', cursive; | ||
height: 100vh; | ||
color: rgba(0, 0, 0, 0.6); | ||
font-weight: 600; | ||
line-height: 1.618; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-font-smoothing: grayscale; | ||
} | ||
p { | ||
line-height: 1.6; | ||
} |
Oops, something went wrong.