- A Next.js Guestbook app with Fauna backend using GraphQL, boilerplate code from Vercel
- Note: to open web links in a new window use: ctrl+click on link
- Vercel Fauna integration project with Fauna database
- Fauna data API transactional database used as a cloud API with native GraphQL
- Next.js used for frontend
- Tailwind CSS used for styling
- Fauna data API transactional database used as a cloud API with native GraphQL with FaunaDB Javascript Driver
- Next v11 minimalist framework for rendering react apps on the server.
- React v17 Javascript library.
- GraphQL v15 API query language
- Tailwind v2 utility-first CSS framework
- PostCSS v8 tool for transforming CSS with JavaScript
npm run dev
runs the app in the development mode. Open http://localhost:3000 to view it in the browser. Note: requires Fauna API keynpm run build
builds the app for production to thebuild
folder. Note: requests Fauna API keynpm run start
to run the built app.
lib/fauna.js
mutation function to create a new guestbook entry
export const createGuestbookEntry = (newEntry) => {
const mutation = gql`
mutation CreateGuestbookEntry($input: GuestbookEntryInput!) {
createGuestbookEntry(data: $input) {
_id
_ts
name
message
createdAt
}
}
`
return graphQLClient.request(mutation, { input: newEntry })
}
- Status: Working. Deployed to Vercel
- To-Do: Add extra fields and a user image/icon. Need Fauna API key to run dev. server
- N/A
- Repo created by ABateman, email: gomezbateman@yahoo.com