Dashboard
@@ -179,7 +177,9 @@ export function MobileGnbDropdown({isLoggedIn} : {
Sign in
@@ -187,7 +187,9 @@ export function MobileGnbDropdown({isLoggedIn} : {
Start for free
diff --git a/pages/index.tsx b/pages/index.tsx
index 336d7bd..817917a 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -2,7 +2,6 @@ import { useState } from 'react';
import classNames from 'classnames';
import type { NextPage } from 'next';
import Head from 'next/head';
-import Link from 'next/link';
import { Layout, Button, Icon, CodeBlock, CodeBlockHeader, Accordion } from '@/components';
import { ChartMotion, StateSharingMotion, ServerMotion, MainBannerMotion } from '@/components/motions';
import UserGroupSVG from '@/public/assets/icons/icon_service_main_users_group.svg';
@@ -10,31 +9,13 @@ import CollaboProfileSVG from '@/public/assets/icons/icon_collaborate_profile.sv
import CollaboCursorSVG from '@/public/assets/icons/icon_collaborate_cursor.svg';
import CollaboSelectionSVG from '@/public/assets/icons/icon_collaborate_selection.svg';
import CollaboEditingSVG from '@/public/assets/icons/icon_collaborate_editing.svg';
+import { FEATURES_CODE } from '@/codes/features';
-type FeatureType = 'profile' | 'cursor' | 'selection' | 'editing';
-const sampleCode = `import yorkie from 'yorkie-js-sdk';
-
-async function main() {
- const client = new yorkie.Client('${process.env.NEXT_PUBLIC_API_ADDR}', {
- apiKey: 'MY_API_KEY',
- });
- await client.activate();
-
- const doc = new yorkie.Document('my-first-document');
- await client.attach(doc);
-
- client.subscribe((event) => {
- if (event.type === 'peers-changed') {
- const peers = event.value[doc.getKey()];
- document.getElementById('peersCount').innerHTML = Object.entries(peers).length;
- }
- });
-}
-main();`;
-
+type FeatureType = keyof typeof FEATURES_CODE;
const Home: NextPage = () => {
const [bannerActive, setBannerActive] = useState(false);
const [activeFeatureCard, setActiveFeatureCard] = useState('profile');
+ const [activeFeatureCode, setActiveFeatureCode] = useState({ type: 'js', info: FEATURES_CODE.profile.js });
// TODO(hackerwins): Remove examples condition when examples are ready.
return (
@@ -89,7 +70,8 @@ const Home: NextPage = () => {
collaborative in a flash!
- Easily add collaboration to your apps with our API-based services. Sign up now and start building powerful, high-performance collaborative features in no time.
+ Easily add collaboration to your apps with our API-based services. Sign up now and start building
+ powerful, high-performance collaborative features in no time.
}>
@@ -110,8 +92,10 @@ const Home: NextPage = () => {
Easily add stable and diverse collaborative features
to your product with Yorkie.
- Transform your local-based product into a collaborative online experience with our powerful tools.
- Sign up now and start providing your users with a completely new real-time experience.
+ Transform your local-based product into a collaborative online experience with our
+ powerful tools.
+ Sign up now and start providing your users with a completely new real-time
+ experience.
{
const target = (e.target as Element).closest('.service_card_menu');
if (!target) return;
- setActiveFeatureCard(target.getAttribute('data-item') as FeatureType);
+ const featureType = target.getAttribute('data-item') as FeatureType;
+ const codeType = FEATURES_CODE[featureType].tabOrder[0];
+ setActiveFeatureCard(featureType);
+ setActiveFeatureCode({
+ type: codeType,
+ info: (FEATURES_CODE[featureType] as any)[codeType],
+ });
}}
>
- Document is stored using conflict-free replicated data types(CRDTs), which ensures that multiple users can edit the same data concurrently without encountering conflicts.
- Presence represents a peer's awareness of the data being edited. It is used to track which users are currently editing the document.
+ Document is stored using conflict-free replicated data types(CRDTs), which ensures that multiple
+ users can edit the same data concurrently without encountering conflicts. Presence represents a
+ peer's awareness of the data being edited. It is used to track which users are currently
+ editing the document.
- }>
+ }
+ >
Learn more about Document and Presence
- Dashboard allows users to easily browse stored documents and monitor the data warehouse in real-time.
- With Dashboard, users can quickly and easily supervise the data warehouse and ensure that it is functioning properly.
+ Dashboard allows users to easily browse stored documents and monitor the data warehouse in
+ real-time. With Dashboard, users can quickly and easily supervise the data warehouse and ensure that
+ it is functioning properly.
- Yorkie offers flexible deployment options, allowing user to use a cloud or host the server on your own premises.
- Whether you want the convenience of cloud or the control of a self-hosted server, Yorkie has you covered.
+ Yorkie offers flexible deployment options, allowing user to use a cloud or host the server on your
+ own premises. Whether you want the convenience of cloud or the control of a self-hosted server,
+ Yorkie has you covered.
}>
Learn more about Self-Hosted Server
@@ -282,10 +290,11 @@ const Home: NextPage = () => {
Can we use the Yorkie for free?
- Yes, Yorkie is free to use.
- You can access it at no cost. Please note that the availability of the service and any associated features
- may be subject to change without notice. It is always a good idea to check the latest information on the
- service's website to ensure that it is still available and meets your needs.
+ Yes, Yorkie is free to use.
+
+ You can access it at no cost. Please note that the availability of the service and any associated
+ features may be subject to change without notice. It is always a good idea to check the latest
+ information on the service's website to ensure that it is still available and meets your needs.
@@ -294,12 +303,14 @@ const Home: NextPage = () => {
Is the Yorkie production ready?
- No, Yorkie is not yet production ready.
- While the CRDT algorithm has been verified, not all of the code has been fully battle-tested. The developers of the
- service currently estimate that the right time to use it in a production environment will be around summer of '23.
- Until then, it is recommended to carefully evaluate the service's capabilities and reliability before using
- it in a production setting. It is also important to note that the availability and features of the service
- may change without notice, so it is always best to check the latest information on the service's website before using it.
+ No, Yorkie is not yet production ready.
+
+ While the CRDT algorithm has been verified, not all of the code has been fully battle-tested. The
+ developers of the service currently estimate that the right time to use it in a production environment
+ will be around summer of '23. Until then, it is recommended to carefully evaluate the
+ service's capabilities and reliability before using it in a production setting. It is also
+ important to note that the availability and features of the service may change without notice, so it
+ is always best to check the latest information on the service's website before using it.
@@ -308,11 +319,17 @@ const Home: NextPage = () => {
How can I contribute to the Yorkie project?
- Yorkie is an open source project, so there are many ways to contribute to its development.
- One way to contribute is by reporting any bugs you encounter while using the service. You can also submit
- pull requests with improvements or new features that you have developed. If you plan to use Yorkie in your
- company, you can also consider donating to the Yorkie community to support its continued development.
- You can learn more about how to contribute to the Yorkie project on its website or by visiting our Discord.
+ Yorkie is an open source project, so there are many ways to contribute to its development.
+
+ One way to contribute is by reporting any bugs you encounter while using the service. You can also
+ submit pull requests with improvements or new features that you have developed. If you plan to use
+ Yorkie in your company, you can also consider donating to the Yorkie community to support its
+ continued development. You can learn more about how to contribute to the Yorkie project on its website
+ or by visiting our{' '}
+
+ Discord
+
+ .
@@ -328,7 +345,12 @@ const Home: NextPage = () => {
>
Contact
- }>
+ }
+ >
Start for free
diff --git a/pages/products.tsx b/pages/products.tsx
index fc29bc3..a7f767e 100644
--- a/pages/products.tsx
+++ b/pages/products.tsx
@@ -1,6 +1,8 @@
+import { useState } from 'react';
import type { NextPage } from 'next';
import Head from 'next/head';
import Link from 'next/link';
+import classNames from 'classnames';
import { Button, Icon, Layout, CodeBlock, CodeBlockHeader } from '@/components';
import { StateSharingDetailMotion, FlexibleDocumentMotion } from '@/components/motions';
import ProductBannerSVG from '@/public/assets/images/banner/img_product_banner.svg';
@@ -9,17 +11,10 @@ import ProductAwarenessRightSVG from '@/public/assets/images/banner/img_product_
import ProductPCSVG from '@/public/assets/images/banner/img_product_pc.svg';
import ProductMobileSVG from '@/public/assets/images/banner/img_product_mobile.svg';
import ProductPackageSVG from '@/public/assets/images/banner/img_product_package.svg';
-
-const textCode = `// Text provides supports for collaborative plain text editing.
-// It also has selection information for sharing the cursor position.
-doc.update((root) => {
- root.text = new yorkie.Text(); // {"text":""}
- root.text.edit(0, 0, 'hello'); // {"text":"hello"}
- root.text.edit(0, 1, 'H'); // {"text":"Hello"}
- root.text.select(0, 1); // {"text":"^H^ello"}
-});`;
+import { DOCUMENT_CODE } from '@/codes/document';
const Products: NextPage = () => {
+ const [documentType, setDocumentType] = useState('common');
return (
@@ -39,7 +34,12 @@ const Products: NextPage = () => {
as a document store.
- }>
+ }
+ >
Start for free
@@ -59,8 +59,8 @@ const Products: NextPage = () => {
- Yorkie allow you to build multiplayer products without the need for database configuration
- and conflict management. This saves time and money.
+ Yorkie allow you to build multiplayer products without the need for database configuration and conflict
+ management. This saves time and money.
Yorkie implements real-time collaboration based on the Conflict-free Replicated Data Type(CRDT) algorithm.
- CRDTs offer a clean and reliable way to resolve conflicts when editing concurrent data, unlike Operational Transformation(OT) algorithms
- which can be complex and may not always ensure convergence. Yorkie's use of the well-proven CRDT algorithm ensures reliable services.
+ CRDTs offer a clean and reliable way to resolve conflicts when editing concurrent data, unlike Operational
+ Transformation(OT) algorithms which can be complex and may not always ensure convergence. Yorkie's
+ use of the well-proven CRDT algorithm ensures reliable services.
- Yorkie provides a general-purpose JSON-like document to enable complex application models while some CRDT libraries that only offer basic data types.
+ Yorkie provides a general-purpose JSON-like document to enable
+ complex application models while some CRDT libraries that only offer basic data types.
- You can build a sense of presence by tracking the status of users who are editing the same document with Presence.
+ You can build a sense of presence by tracking the status of users who are editing the same document with
+ Presence.
- Yorkie SDKs support development for iOS, Android and Web applications.
+ Yorkie SDKs support development for iOS,{' '}
+ Android and Web applications.
Size optimization
- Yorkie uses Garbage Collection and Lamport timestamps to reduce the size of documents.
+ Yorkie uses Garbage Collection and
+ Lamport timestamps to reduce the size of
+ documents.
Security
- Auth Webhook allows users to verify the authorization of clients to access documents from an external service.
+ Auth Webhook allows users to verify the authorization
+ of clients to access documents from an external service.
Dashboard in Cloud is accessible from any device without the need for installation.
+
+ Dashboard in Cloud is accessible from any device without the need for installation.
+
@@ -203,7 +236,8 @@ const Products: NextPage = () => {
How to build self-hosted server
- Yorkie open-source package includes SDKs, a server, and a database, making it easy to implement the co-editing feature.
+ Yorkie open-source package includes SDKs, a server, and a database, making it easy to implement the
+ co-editing feature.