Skip to content

Commit b1d6191

Browse files
author
Jake Lazaroff
committed
Add framework readmes
1 parent 8ea6684 commit b1d6191

7 files changed

Lines changed: 49 additions & 7 deletions

File tree

js-pkg/create-y-sweet-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ npx create-y-sweet-app@latest
1010

1111
You'll be asked for the name of your project and then prompted to choose a framework.
1212

13-
While Y-Sweet works with any web framework, `create-y-sweet-app` includes quick-start templates for [Next.js](https://nextjs.org) and [Remix](https://remix.run).
13+
While Y-Sweet works with any web stack, `create-y-sweet-app` includes quick-start templates for [Next.js](https://nextjs.org) and [Remix](https://remix.run).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
This is a [Y-Sweet](https://jamsocket.com/y-sweet) project using [Next.js](https://nextjs.org). It was bootstrapped with [`create-y-sweet-app`](https://www.npmjs.com/package/create-y-sweet-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```sh
8+
npm run dev
9+
```
10+
11+
Open [http://localhost:3000](http://localhost:3000) in your browser to see the app running. If you open it in multiple windows, you'll see that all the state in the app is automatically kept in sync!
12+
13+
You can start editing the page by modifying `app/page.tsx`.
14+
15+
## Learn More
16+
17+
While you're building your Y-Sweet app, you might also want to check out:
18+
19+
- [Y-Sweet documentation](https://docs.jamsocket.com/y-sweet/) - learn about Y-Sweet's features and API.
20+
- [Discord server](https://discord.gg/N5sEpsuhh9) - chat with the developers and get help from other users.
21+
- [Y-Sweet GitHub repository](https://github.com/jamsocket/y-sweet) - leave feedback, report bugs and contribute to Y-Sweet.

js-pkg/create-y-sweet-app/src/frameworks/nextjs/app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { DocumentManager } from "@y-sweet/sdk";
22
import { YDocProvider } from "@y-sweet/react";
33

4-
import { MyCollaborativeApp } from "@/components/MyCollaborativeApp";
4+
import { App } from "@/components/App";
55

66
const manager = new DocumentManager(process.env.CONNECTION_STRING!);
77

@@ -17,7 +17,7 @@ export default async function Home() {
1717

1818
return (
1919
<YDocProvider docId={docId} authEndpoint={getClientToken}>
20-
<MyCollaborativeApp />
20+
<App />
2121
</YDocProvider>
2222
);
2323
}

js-pkg/create-y-sweet-app/src/frameworks/nextjs/components/MyCollaborativeApp.tsx renamed to js-pkg/create-y-sweet-app/src/frameworks/nextjs/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Presence } from "./Presence";
33
import { Footer } from "./Footer";
44
import { Todos } from "./Todos";
55

6-
export function MyCollaborativeApp() {
6+
export function App() {
77
return (
88
<div className="min-h-screen flex flex-col justify-between max-w-[60rem] mx-auto before:content-[''] before:block before:absolute before:top-0 before:left-0 before:right-0 before:border-t-4 before:border-[#fc5c86]">
99
<header className="flex flex-col gap-8 p-12">
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
This is a [Y-Sweet](https://jamsocket.com/y-sweet) project using [Remix](https://remix.run). It was bootstrapped with [`create-y-sweet-app`](https://www.npmjs.com/package/create-y-sweet-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```sh
8+
npm run dev
9+
```
10+
11+
Open [http://localhost:3000](http://localhost:3000) in your browser to see the app running. If you open it in multiple windows, you'll see that all the state in the app is automatically kept in sync!
12+
13+
You can start editing the page by modifying `app/page.tsx`.
14+
15+
## Learn More
16+
17+
While you're building your Y-Sweet app, you might also want to check out:
18+
19+
- [Y-Sweet documentation](https://docs.jamsocket.com/y-sweet/) - learn about Y-Sweet's features and API.
20+
- [Discord server](https://discord.gg/N5sEpsuhh9) - chat with the developers and get help from other users.
21+
- [Y-Sweet GitHub repository](https://github.com/jamsocket/y-sweet) - leave feedback, report bugs and contribute to Y-Sweet.

js-pkg/create-y-sweet-app/src/frameworks/remix/app/components/MyCollaborativeApp.tsx renamed to js-pkg/create-y-sweet-app/src/frameworks/remix/app/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Presence } from "./Presence";
33
import { Footer } from "./Footer";
44
import { Todos } from "./Todos";
55

6-
export function MyCollaborativeApp() {
6+
export function App() {
77
return (
88
<div className="min-h-screen flex flex-col justify-between max-w-[60rem] mx-auto before:content-[''] before:block before:absolute before:top-0 before:left-0 before:right-0 before:border-t-4 before:border-[#fc5c86]">
99
<header className="flex flex-col gap-8 p-12">

js-pkg/create-y-sweet-app/src/frameworks/remix/app/routes/_index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type MetaFunction } from "@remix-run/react";
22
import { YDocProvider } from "@y-sweet/react";
33

4-
import { MyCollaborativeApp } from "~/components/MyCollaborativeApp";
4+
import { App } from "~/components/App";
55

66
export const meta: MetaFunction = () => [{ title: "Y-Sweet + Remix" }];
77

@@ -18,7 +18,7 @@ export default function Home() {
1818

1919
return (
2020
<YDocProvider docId={docId} authEndpoint="/auth">
21-
<MyCollaborativeApp />
21+
<App />
2222
</YDocProvider>
2323
);
2424
}

0 commit comments

Comments
 (0)