|
| 1 | +--- |
| 2 | +title: Templates |
| 3 | +description: Get started quickly with Echo using pre-built templates |
| 4 | +--- |
| 5 | + |
| 6 | +import { Step, Steps } from 'fumadocs-ui/components/steps'; |
| 7 | + |
| 8 | +The easiest way to get started with Echo is to use one of our pre-built templates. |
| 9 | + |
| 10 | +## React |
| 11 | + |
| 12 | +The React template is a simple application that uses Vite and `echo-react-sdk`. Uniquely Echo does not require |
| 13 | +a server to make API calls because it handles Oauth directly in the browser. |
| 14 | + |
| 15 | +<Steps> |
| 16 | + <Step> |
| 17 | + ### Create an Echo App |
| 18 | + Go to [echo.merit.systems/new](https://echo.merit.systems/new) to get an `app_id`. |
| 19 | + </Step> |
| 20 | + |
| 21 | + <Step> |
| 22 | + ### Create a React app using Vite |
| 23 | + Run the following commands to create a new React app using Vite. |
| 24 | + |
| 25 | + <Tabs items={['npm', 'yarn', 'pnpm', 'bun']}> |
| 26 | + <Tab value="npm"> |
| 27 | + ```sh lineNumbers |
| 28 | + npx echo-start@latest --template react --app-id YOUR_ECHO_APP_ID |
| 29 | + ``` |
| 30 | + </Tab> |
| 31 | + <Tab value="yarn"> |
| 32 | + ```sh lineNumbers |
| 33 | + yarn dlx echo-start@latest --template react --app-id YOUR_ECHO_APP_ID |
| 34 | + ``` |
| 35 | + </Tab> |
| 36 | + <Tab value="pnpm"> |
| 37 | + ```sh lineNumbers |
| 38 | + pnpx echo-start@latest --template react --app-id YOUR_ECHO_APP_ID |
| 39 | + ``` |
| 40 | + </Tab> |
| 41 | + <Tab value="bun"> |
| 42 | + ```sh lineNumbers |
| 43 | + bunx echo-start@latest --template react --app-id YOUR_ECHO_APP_ID |
| 44 | + ``` |
| 45 | + </Tab> |
| 46 | + </Tabs> |
| 47 | + </Step> |
| 48 | + |
| 49 | + |
| 50 | +</Steps> |
| 51 | + |
| 52 | +## Next.js |
| 53 | + |
| 54 | +The Next.js template is a full-stack application that uses the Next.js framework with the `echo-next-sdk`. |
| 55 | + |
| 56 | +<Steps> |
| 57 | + <Step> |
| 58 | + ### Create an Echo app |
| 59 | + Go to [echo.merit.systems/new](https://echo.merit.systems/new) to get an `app_id`. |
| 60 | + </Step> |
| 61 | + |
| 62 | + <Step> |
| 63 | + ### Create a Next.js app |
| 64 | + Run the following commands to create a new Next.js app. |
| 65 | + |
| 66 | + <Tabs items={['npm', 'yarn', 'pnpm', 'bun']}> |
| 67 | + <Tab value="npm"> |
| 68 | + ```sh lineNumbers |
| 69 | + npx echo-start@latest --template next --app-id YOUR_ECHO_APP_ID |
| 70 | + ``` |
| 71 | + </Tab> |
| 72 | + <Tab value="yarn"> |
| 73 | + ```sh lineNumbers |
| 74 | + yarn dlx echo-start@latest --template next --app-id YOUR_ECHO_APP_ID |
| 75 | + ``` |
| 76 | + </Tab> |
| 77 | + <Tab value="pnpm"> |
| 78 | + ```sh lineNumbers |
| 79 | + pnpx echo-start@latest --template next --app-id YOUR_ECHO_APP_ID |
| 80 | + ``` |
| 81 | + </Tab> |
| 82 | + <Tab value="bun"> |
| 83 | + ```sh lineNumbers |
| 84 | + bunx echo-start@latest --template next --app-id YOUR_ECHO_APP_ID |
| 85 | + ``` |
| 86 | + </Tab> |
| 87 | + </Tabs> |
| 88 | + </Step> |
| 89 | +</Steps> |
0 commit comments