supabaseprovider

A TipTap collboration provider using Supabase realtime

MIT License

Downloads
2
Stars
8
Committers
2

About The Project

Easily set up collaborative editing with Supabase Realtime! Built with YJS.

Not recommended for production use in its current state.

Contributors welcome!

Usage

"@kamick/supabaseprovider": "^0.0.2",

Input:

export interface SupabaseProviderConfiguration {
    /**
    * The identifier/name of your document
    */
    name: string;
    /**
     * The actual Y.js document
     */
    document: Y.Doc;
    /**
     * The awareness instance
     */
    awareness?: Awareness;
    /**
     * Details about the database to connect to
     */
    databaseDetails: {
        schema: string,
        table: string,
        updateColumns: { name: string, content: string },
        conflictColumns: string
    }
}

Example usage with React:

const supabase = createClientComponentClient<Database>();
const router = useRouter();
const doc = useMemo(() => new Y.Doc(), []);
const provider = 
    useMemo(() => new SupabaseProvider(supabase, {
            name: documentName,
            document: doc,
            databaseDetails: {
            schema: {schema},
            table: {table},
            updateColumns: { name: {column_name}, content: {column_content} },
            conflictColumns: {conflict_columns_comma_concat},
            },
        }), [doc, documentName, supabase]);

return <TipTapEditor doc={doc} provider={provider} user={user} router={router} />;

Roadmap

  • Add Changelog
  • Add Additional Templates w/ Examples
  • Add Testing
  • Production ready

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Kevin Amick - @kevinamick - [email protected]

Project Link: https://github.com/kevinamick/supabaseprovider

Package Rankings
Top 41.09% on Npmjs.org
Badges
Extracted from project README
Forks Stargazers Issues MIT License
Related Projects