Notion table, sorts, and advanced filters clone with Next.js & TailwindCSS
This project is for research and educational purpose. The project is a web application that displays a table view of a Notion database and allows users to sort and filter the database using the Notion API.
Clone the repository.
git clone
Configure the environment variables.
Create a .env
file in the root of the project and add the following environment variables:
NOTION_SECRET=<your-notion-secret>
NOTION_DB_ID=<your-notion-db-id>
NEXT_PUBLIC_MAX_FILTER_DEPTH=2
NEXT_PUBLIC_ENABLE_NEGATION=true
Install dependencies.
npm install
Start the development server.
npm run dev
Open the source code and start editing!
Your site is now running at http://localhost:3000
!
Update next.config.mjs
file.
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ["geist"],
+ output: "standalone",
};
export default nextConfig;
Build the Docker image.
docker build -t notion-table-view .
Run the Docker container.
docker run -p 3000:3000 notion-table-view
Open the source code and start editing!
Your site is now running at http://localhost:3000
!
Build a table view UI for Notion databases
Build a Notion filter UI for supporting database filters.
checkbox , date , multi_select , number , rich_text , select , timestamp , status
.Implement the NOT operator for compound filter conditions. Support compound filter conditions that contain only filter operators where the Notion API offers the logical negation e.g. !( )
is is_not_empty
, !( less_than )
is greater_than_or_equal_to
!(( datePropertyX is after “2023-01-01” AND textPropertyY ends with “.com”) OR textPropertyZ starts with “www.”)
should indicate “Unsupported conditions for NOT: ends with , starts with