Skip to content

This is an example app to demonstrate crud operations using Next.js, Tigris TypeScript SDK & Tailwind CSS.

License

Notifications You must be signed in to change notification settings

ishaanbedi/tigris_nextjs_notes_app

Repository files navigation

Tigris + Next.js Notes App

This is an example app to demonstrate crud operations using Next.js, Tigris TypeScript SDK & Tailwind CSS.

Check out the project live at tigris-nextjs-notes-app.vercel.app/

Schema of the project:

The project is based on the following schema:

{
  "title": "notes",
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "searchIndex": true
    },
    "body": {
      "type": "string"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "autoGenerate": true
    }
  },
  "primary_key": ["id"]
}

Refer to db/model.ts to check the schema based on Tigris TypeScript SDK.

Next.js API Route:

/api/crudHandler

To handle all crud operations via one endpoint based on the request method (GET, POST, PUT, DELETE) for respective operations.

/api/note/[id]

To handle GET, PUT, DELETE operations for a single note based on the id of the note.

Deployment

Click on the button below to deploy the app on Vercel:

Deploy with Vercel

When prompted for environment variables, refer to the Application Keys section under your project's dashboard on Tigris.

License

MIT License. Check out the LICENSE file for more details.

About

This is an example app to demonstrate crud operations using Next.js, Tigris TypeScript SDK & Tailwind CSS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published