summaryrefslogtreecommitdiff
path: root/Documentation/source/frontend/routes.rst
diff options
context:
space:
mode:
authorBertrand Yuan <189593334+bertyuan@users.noreply.github.com>2026-04-27 20:54:16 +0800
committerGitHub <noreply@github.com>2026-04-27 20:54:16 +0800
commit85b6fb59db5fe1112c58eff9d02ae4f9c9b6456d (patch)
tree8c83fc84bd9547630e6733929dec77e102e055a8 /Documentation/source/frontend/routes.rst
parent658798b3a2378bb6df16cfbb16d707c6fb719e1e (diff)
parentdbb5e791f0c228369605d126dd590962ebe1eddc (diff)
Merge pull request #21 from bertyuan/Documentationv1.2
docs: add comprehensive documentation for operations
Diffstat (limited to 'Documentation/source/frontend/routes.rst')
-rw-r--r--Documentation/source/frontend/routes.rst66
1 files changed, 66 insertions, 0 deletions
diff --git a/Documentation/source/frontend/routes.rst b/Documentation/source/frontend/routes.rst
new file mode 100644
index 0000000..ed2c618
--- /dev/null
+++ b/Documentation/source/frontend/routes.rst
@@ -0,0 +1,66 @@
+Routes and Page Responsibilities
+================================
+
+Public Routes
+-------------
+
+.. list-table::
+ :header-rows: 1
+ :widths: 22 34 44
+
+ * - Route
+ - Main File
+ - Responsibility
+ * - ``/``
+ - ``src/app/(main)/(home)/page.tsx``
+ - Home page with hero, recent posts, and newsletter CTA.
+ * - ``/posts``
+ - ``src/app/(main)/(home)/posts/page.tsx``
+ - Paginated list of published posts.
+ * - ``/posts/[slug]``
+ - ``src/app/(main)/(home)/posts/[slug]/page.tsx``
+ - Post detail page with rich text, metadata, sharing, and comments.
+ * - ``/tags``
+ - ``src/app/(main)/(home)/tags/page.tsx``
+ - Tag index with post counts.
+ * - ``/tags/[tag]``
+ - ``src/app/(main)/(home)/tags/[...slug]/page.tsx``
+ - Tag-filtered post list.
+ * - ``/about``
+ - ``src/app/(main)/(home)/(mdx)/about/page.mdx``
+ - MDX profile page.
+ * - ``/login``
+ - ``src/app/(main)/(auth)/login/page.tsx``
+ - OAuth login entry.
+ * - ``/admin``
+ - ``src/app/(payload)/admin``
+ - Payload CMS admin.
+
+API and Generated Routes
+------------------------
+
+.. list-table::
+ :header-rows: 1
+ :widths: 24 56
+
+ * - Route
+ - Responsibility
+ * - ``/api/auth/[...all]``
+ - better-auth route handler.
+ * - ``/api/comments/[...comment]``
+ - Fuma Comments route handler.
+ * - ``/api/search``
+ - Public search index endpoint.
+ * - ``/rss.xml``
+ - Feed output.
+ * - ``/banner.png``
+ - Site-level Open Graph image.
+ * - ``/og/[...slug]``
+ - Post-specific Open Graph image.
+
+Routing Rule
+------------
+
+Add new public pages under ``src/app/(main)`` and preserve the existing layout
+split between the public site and Payload admin. New API routes should document
+their public contract in :doc:`../reference/api`.