Due to the use of object columns in the schema, which will no longer be available after December 13 2023, Xataform stops working and will not be maintained by Xata. If you are using the object column type, please make sure to migrate away before the end date following the migration guide.
You can read more about the project and its motivation in our blog post.
If you prefer a guided tour, here is a loom.
To create new forms, you can use our instance at: https://xataform.com/
Or deploy your own following the instructions below.
In order to run the project, you will need two accounts (free):
- A Xata account for the database - https://xata.io/
- A Clerk account for the authentication layer - https://clerk.com/
You will also need to have Node 18 installed, and pnpm is a nice to have.
-
Install the dependencies:
pnpm install
-
Initialize your database:
pnpm xata:init
-
Add Clerk keys in
.env.local
: https://clerk.com/docs/nextjs/set-environment-keys -
At this stage, you should have 3 values in your
.env.local
# Xata XATA_API_KEY=xau_… # Clerk NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_… CLERK_SECRET_KEY=sk_…
If not, please check that you picked
nextjs
in clerk. -
Start the dev server:
pnpm dev
This application is built on top of Xata, Next.js, tRPC and Clerk.
Everything is defined in /server
:
-
/server/services
: you can find any external service. This is a simple dependency injection pattern to allow easy stubbing in our unit tests. Therefore, you don’t need any network needs to run the test and every tests will stay fast. -
/server/routers
: All business is there, divide per module.
A classic Next.js application pattern, every file is a page.