dodil/wiki-challenge

Dodil Wiki Challenge: build the Notion replacement with search by meaning. Instructions for you and your AI assistant.

DODIL-WIKI-CHALLENGE.md

Dodil Wiki Challenge: build the Notion replacement

How to use this file: download it, put it in an empty project folder, and give it to your AI assistant (Claude Code, Claude, ChatGPT or Cursor) with "Read DODIL-WIKI-CHALLENGE.md and help me build this, step by step." It is written for you and for your assistant.

Build a team wiki where people can ask a question and get an answer that cites their own pages. Start from a working starter that already has sign-in, the database, AI models and MCP set up. Your entry becomes a template any team can copy into their own Dodil organization with one command. After the contest, you can set it up for paying clients.

Prizes

PlacePrize
Winner$500 in Dodil credit
2nd$200 in Dodil credit
3rd$100 in Dodil credit
Every valid entry$25 in Dodil credit

The winning wiki becomes the official Dodil wiki template, credited to you. Credit terms are in section 8.

Dates: entries close on 30 November 2026 at 23:59 UTC. Results by 7 December 2026.

At a glance

  • Build: spaces, nested Markdown pages, version history, search by meaning, cited answers, and an MCP endpoint so Claude or ChatGPT can use the wiki.
  • Stack: Python (FastAPI) on Dodil. One database holds the text, the vectors and the links between pages.
  • Enter: a public repo on Dodil Git with two topics, then post the link in the Dodil Discord #challenges channel (section 5).
  • Questions: Dodil Discord, #challenges (https://discord.gg/z7UEFwyECF).

1. Why Dodil, and why this challenge

AI agents can write software now. Until now, nothing was built for them to run it. An agent can write a wiki in an afternoon. Then it has to sign up for a database here, sign-in there, hosting somewhere else and an AI API on top: four bills, four sets of keys, and nobody checking it's safe to launch.

Dodil is one cloud built for that job. One account covers the database (DataK3: tables, vectors, graph and files over one copy of your data), the apps and AI models (Ignite), sign-in (appid) and code with CI (Dodil Git). It runs on our own servers in London, and we wrote every layer above them. Your agent signs in once and can use all of it.

Why a wiki. Teams pay for Notion or Confluence per seat, every month, forever, and their knowledge lives inside someone else's product. We think a business should own its tools: built by an agent, running on its own cloud account, changed whenever it wants. What's missing is good starting points. Your entry becomes one: anyone can remix it into their own Dodil organization with one command and have it live in minutes.


2. What you are building

A team wiki with AI search that anyone can remix (copy into their own Dodil organization with one command) and have running in minutes. A team says "our docs are scattered and nobody can find anything", and the answer is "here's one, remix it, ask it anything."

The heart of it: search by meaning over the team's own pages, and answers that cite the pages they came from. On Dodil the text, the vectors and the links between pages live in one database (DataK3: SQL, vector search and graph over the same rows), so there is no separate search service to run.

Required core

AreaWhat it must do
PeopleSpaces (e.g. "Engineering", "HR"). Each space has an owner who adds members as editor or viewer. A viewer can't edit. Nobody sees a space they're not in.
PagesPages nest inside pages (a tree per space). Write in Markdown with a live preview. Move a page, rename it, archive it.
HistoryEvery save is a version: who, when, and what changed. Show the difference between two versions and restore an old one.
SearchOne search box that finds pages by meaning ("how do I get a laptop?" finds the "Equipment requests" page) as well as by exact words. Results only from spaces the person can see.
AskAsk a question in plain language and get a short answer that cites the pages it used, with links. If the wiki doesn't say, the answer says so instead of inventing one.
MCPClaude or ChatGPT can use the wiki through MCP, with real actions: "what's our refund policy?", "summarise the onboarding pages for a new designer", "add a page 'Holiday rota 2027' under HR", "append today's decision to the 'Pricing' page", "what changed in Engineering this week?". The AI only sees what the signed-in person can see.
WebA simple web page that does the same things.

Search and answers: a simple way that works

This is the part that scores most and worries people most. You don't need a clever pipeline. This is enough to do well:

  1. On save, split the page into chunks (for example by heading, a few hundred words each). Embed each chunk with jina-embeddings-v4 (it returns 2048 numbers per text). Store each chunk in its own row with its space_id, page_id and an embedding VECTOR(2048) column. Only re-embed chunks that changed: embeddings are billed per token to the organization running the app.
  2. Search: embed the question, then filter and rank in one query: WHERE space_id IN (...the person's spaces...) ORDER BY embedding <=> $1 LIMIT 10. <=> is cosine distance. DataK3 re-checks the filter, so you still get your 10 results when the filter is narrow. Mix in a plain match on exact words in titles and text, and show each page once.
  3. Ask: take the best chunks, number them, and ask kimi-k2.6 to answer only from them and cite them as [1], [2]. Turn those numbers into page links in your own code. If nothing is close enough, or the model says the answer isn't there, reply that the wiki doesn't say.
  4. The wall: the space filter lives in the use case, so the web page and MCP can't skip it. Test it: a page in a space you're not in must never appear in search, in an answer, or in a citation.

At contest size you don't need a vector index. Without one, DataK3 scans every vector exactly, which is correct at any size. dodil://k3/sql covers indexes if you want one.

Extras (scored, not required)

  • Links between pages with [[Page name]], backlinks on each page, and "what links here?" (DataK3 graph queries suit this; a graph's node and edge keys must be integers, see dodil://k3/sql. A plain links table queried with SQL is fine too).
  • Import a folder of Markdown files, or a Notion export.
  • Comments on a page, and page templates (meeting notes, how-to, decision record).
  • Pages that haven't been touched in six months flagged as possibly out of date.

A sensible order of work

  1. Remix the starter and see it live with sign-in (day one).
  2. Spaces, roles and pages, with tests for the walls.
  3. Versions: save, diff, restore.
  4. Search, then Ask, as above.
  5. MCP tools on the same use cases.
  6. Polish the writing experience, then extras if you have time.

A clean, working core beats a big broken app.


3. The rules (an entry that breaks one is not judged)

  1. Public repo on Dodil Git (git.dodil.io) in your own Dodil organization, MIT licence, tagged dodil-challenge and dodil-challenge-wiki.
  2. Dodil cloud services only:
    • DataK3 for all data, including the vectors. No outside database or search service.
    • appid user pool for sign-in. No home-made login, Auth0, Firebase or similar.
    • Ignite runs the app.
    • Dodil Models for AI and embeddings. No OpenAI, Anthropic or other API keys.
  3. Deployed by Dodil Git CI (push → build → deploy) to a live Ignite URL.
  4. One MCP endpoint whose tools are actions (search_pages, ask, create_page), never raw table access.
  5. Remixable: a valid .dodil/remix.yaml. We remix your repo into a fresh organization ourselves, and it must come up live, with its tables and sign-in.
  6. Your own name and design. No Notion or Confluence name, logo or artwork in the app.

4. How to build it

Fastest start: remix the starter

The Dodil starter (https://git.dodil.io/dodil/boards-challenge) is a small, working, remixable app with sign-in, DataK3, Dodil Models and MCP already wired. It happens to be a task board: keep the wiring and the layers, replace the board with spaces and pages.

dodil update                     # CLI 0.1.98 or later
dodil git remix dodil/boards-challenge --to-org <your-org> --name <your-repo>

Keep <your-repo> to 18 characters or less (e.g. team-wiki). Your remix is your entry: make it public and tag it when you're ready (see "Publish your entry"). Starting from scratch is fine too, as long as you follow the rules.

Stack and structure

  • Python backend, FastAPI recommended.
  • Light Domain-Driven Design. The web routes and the MCP tools are two thin doors onto the same use cases, so every rule lives in one place. The starter already has this shape; rename app/boards/ to your own package:
app/wiki/
  domain/          Space, Membership, Page, PageVersion, the rules
                   (a viewer can't edit, nobody reads a space they're not in)
  application/     use cases: create_page, save_page, move_page, restore_version,
                   search_pages, ask, recent_changes; ports.py (what they need)
  infrastructure/  DataK3 repositories (pages, versions, chunks + vectors),
                   Dodil Models client (embeddings + chat)
  doors/web.py     FastAPI routes + the web page -> call application/
  doors/mcp.py     MCP tools                     -> call application/
  doors/identity.py  who is signed in (passed by the Dodil gateway)
  main.py          wires it together, /mcp, /healthz
tests/             the main rules: roles, space visibility in search and answers, versions
schema.sql         the tables (created by the remix)
.dodil/remix.yaml  what a remix creates
.dodil/deploy.yaml how CI deploys it
.github/workflows/ci.yml  test -> build (deploy by Dodil Git CI)
README.md
  • Tests for the main rules, above all that search and answers never leak a page from a space the person can't see. The starter's tests run with fakes for data and AI, so they need no Dodil account.
  • Documentation: a README (what it is, how to run it, how to remix it, what you'd improve) and short notes on your main design decisions.

Your best guide: the Dodil MCP connection

Connect Dodil to your assistant, and it can read Dodil's guides and run every Dodil command for you.

# 1. Sign up free at https://dodil.io
# 2. Install the CLI and sign in
curl -fsSL https://cli.dodil.io | bash
dodil auth login
# 3. Connect your assistant (Claude Code shown)
claude mcp add dodil -- dodil mcp

Then ask your assistant to read these three guides before writing code:

GuideCLIMCP resourceWhat it covers
Builddodil guidedodil://buildSign-in through the gateway, one /mcp beside the routes, deploy via Git CI, the rules to copy
Remixdodil guide remixdodil://git/remixEvery remix.yaml field, a complete minimal template, what to do after a remix
Data(MCP only)dodil://k3/sqlDataK3's SQL, vector search and graph over the same rows

Facts to build on

  • Data: DataK3 speaks the Postgres wire protocol at pg.uk-lon-1.dodil.io:5432 (sslmode=require). The database name is your bucket. Every table needs a primary key, and you choose the key yourself (there are no sequences, so no SERIAL). Vectors live in a VECTOR(n) column next to the row they describe (VECTOR(2048) for jina-embeddings-v4), and ORDER BY embedding <=> '[...]' LIMIT k returns the nearest by cosine distance. dodil://k3/sql has the details.
  • AI: Dodil Models is OpenAI-compatible at https://api.dodil.io/v1 (POST /chat/completions, /embeddings) with a service-account token as the bearer. Chat model kimi-k2.6; embeddings jina-embeddings-v4 (2048 dimensions). The gateway wraps the OpenAI body as {"status": ..., "data": {...}}, so unwrap data before reading choices or data[0].embedding. The starter's infrastructure/dodil.py shows this for chat; embeddings are wrapped the same way.
  • Who is signed in: with a user pool attached, the Dodil gateway signs the person in and passes their identity to your app. Don't write login code. See dodil://build.
  • Credentials: the remix generates the app's service account and puts its ID and secret into the repo's CI secrets. deploy.yaml hands them to the app as DODIL_SERVICE_ACCOUNT_ID / DODIL_SERVICE_ACCOUNT_SECRET. Never commit a secret.

Make it remixable

The remix guide (dodil guide remix) has a complete minimal remix.yaml + deploy.yaml + schema.sql for exactly this shape of app (one bucket, one user pool, one service account with data and AI access). The starter already follows it. Three things that catch people:

  1. Name budget: the bucket <repo>-data must be at most 25 characters, so keep your repo name to 18 characters or less (e.g. team-wiki).
  2. Keep on_conflict: fail (the default) for the bucket and pool your deploy.yaml names.
  3. After a remix, the deploy adds the app's sign-in callback to the pool itself. Two things can still need a person, and your README should say so: if the deploy log says the callback was "not registered", run the command that line prints, once; and when Claude or ChatGPT connects to /mcp, its client arrives pending and needs approving once (dodil appid client list <repo>-users, then dodil appid client approve <repo>-users <client-id>). The remix guide's "After the remix" section has the details.

Check your template as often as you like:

dodil git remix check <your-org>/<repo>          # valid / invalid + every error
dodil git remix plan <your-org>/<repo> --to-org <a test org>   # creates nothing

Publish your entry

dodil git repo visibility <your-repo> public
dodil git repo topics <your-repo> set dodil-challenge,dodil-challenge-wiki
dodil git remix check <your-org>/<your-repo>

Or do it in the remix itself: add --visibility public --topics dodil-challenge,dodil-challenge-wiki to the remix command. The repo then goes public with its topics only once its first deploy succeeds.


5. How to enter

Entering takes two steps. The only thing we need is your public repo on Dodil Git. We remix it ourselves to judge it.

  1. Make your repo public and tag it dodil-challenge and dodil-challenge-wiki (see "Publish your entry").
  2. Post in the Dodil Discord #challenges channel (https://discord.gg/z7UEFwyECF):
  • required: your public repo link (https://git.dodil.io/<your-org>/<your-repo>)
  • required: the name of your Dodil organization (credit goes there)
  • optional: the live link, with test logins for an owner, an editor and a viewer (test accounts only)
  • optional: a short screen recording of it working from Claude or ChatGPT
  • optional: 5 honest lines on what was hard (we read every one)

Entering through the Freelancer contest instead? That counts too: submit the same repo link and organization name there.

6. How we judge

The gate: we remix your repo into a fresh organization, follow your README's post-remix steps, and sign in. If it doesn't come up, the entry stops there.

PointsWhat
30The core works and the walls hold: search and answers never show a space you're not in, viewers can't edit, versions restore
25Search by meaning and cited answers are genuinely good, from the web and from Claude or ChatGPT
20Code quality: clear DDD layers, use cases shared by web and MCP, tests, documentation
15The extras
10Simplicity and polish, including the writing experience

A clean, working core beats a big broken app.

7. After the contest: earn with Dodil

The winner's wiki is published as the official Dodil wiki template, credited to you. But your entry isn't a throwaway, whether you win or not. It's a product you can set up for real businesses, and the Dodil Partner Programme pays you in three ways:

HowWhat you earn
Build for clientsYou quote the project, and Dodil handles the contract and payment. You keep 93.5% of the price.
Refer clients15% of everything a client you refer pays Dodil, for 12 months (24 months once you reach Premier).
Manage clientsRun your clients' Dodil accounts at a partner discount: 15% off at 3 paying clients (Certified), 25% off at 10 clients or $1,000 a month (Premier). You set what you charge them.

Example: a 30-person company is tired of paying per seat for its wiki and can't find anything in it. You remix your entry into their organization, import their Markdown or Notion export, set up a space per team, and charge $2,000 for the project. You keep $1,870. If you referred them, you also get 15% of their Dodil bill every month for a year. Ten clients like that make a business.

Applying is free and takes one command. You don't need to win, and you can apply on day one:

dodil partner terms show --kind programme
dodil partner apply --company "Your Studio" --country SG --website https://you.example \
  --expected-clients 3 --message "Dodil Wiki Challenge entrant" --accept-terms

All numbers: https://partner.dodil.io/docs/programme-numbers

Strong entrants are also invited to future paid projects.

8. Credit terms

  • Dodil credit is added to the Dodil organization you name in your entry, within 7 days of the results.
  • It pays your Dodil bills: usage, and the monthly fee of a paid plan. To use it, the organization needs a paid plan and a card on file; the credit is spent before the card is charged.
  • It is valid for 12 months from the day it is added. It is not cash, can't be exchanged for cash, and can't be transferred or sold.
  • A "valid entry" passes every rule in section 3 and the judging gate in section 6. One entry, and one credit, per person.
  • No purchase is needed to enter or to win.

Questions: ask in the Dodil Discord #challenges channel (https://discord.gg/z7UEFwyECF). Stuck on Dodil itself? Ask there too, and put it in your honest notes. That feedback is part of why we run this.