Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

RFC: Use WordPress as your app's data store

Đang mở
#2,679 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
graphql, json, typescript, wordpress
Lĩnh vực
backend, database

Hướng nghiên cứu

This is an RFC describing a multi-stage data store; start by reading the linked storage and REST work in issue #2674. The RFC lays out follow-on work for collection registration, WPGraphQL support, and a JS client, but does not identify implementation files or tests. Before taking it on, check the project discussion for a decided scope; done would need to be defined for one specific stage.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

[Area] Core [Area] WordPress Plugin [Type] Feature

Idea

Faustabase (working name) is a faster way to give your app a database, using the WordPress site you already have. Turn on FaustWP's document store, save JSON from your app, and never silently lose a write.

flowchart TD
  App["Your app"] -->|REST or GraphQL| WP["FaustWP<br/>checks version"]
  WP --> T[("wp_faust_<br/>documents")]
  Admin["wp-admin<br/>Tools screen"] -.->|read-only| T

Why

  • You don't need a second database like Firebase or Supabase, or a custom plugin.
  • Normal WordPress and WPGraphQL saves let the last write win. Faustabase rejects a stale write with a 409.
  • Site owners can see the data in wp-admin, and WordPress users and roles control access.

Decided

  • Documents live in one dedicated table, grouped into collections like Firestore. History can be added later without migrating data.

  • REST and WPGraphQL can both get, update, delete, list and add documents, with the same version check.

  • Collections are admin-only until you register them. Registering a collection sets its access mode and a JSON Schema that WordPress validates, which is how a form or waitlist accepts public writes:

    register_faust_collection( 'waitlist', array(
    	'access' => 'public-create', // or 'admin' (default) or 'owner'
    	'schema' => array( 'type' => 'object', 'required' => array( 'email' ) ),
    ) );
    
  • A JS client for app servers would look roughly like this:

    const ref = store.collection('preferences').doc('user-42');
    await ref.update((d) => ({ ...d, theme: 'dark' })); // retries on conflict
    

Plan

  1. Storage and REST: #2674.
  2. register_faust_collection with access modes and schemas.
  3. WPGraphQL support.
  4. The JS client.

Realtime, complex queries and high write volume are out of scope.

Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
157
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
133

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wpengine/faustjs

Tất cả issue của wpengine/faustjs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.