-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from elwood-software/docs/first
first docs setup
- Loading branch information
Showing
43 changed files
with
755 additions
and
671 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
const root = require('../../prettier.config') | ||
|
||
/** @type {import('prettier').Options} */ | ||
module.exports = { | ||
singleQuote: true, | ||
semi: false, | ||
...root, | ||
plugins: ['prettier-plugin-tailwindcss'], | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
--- | ||
title: Getting started | ||
--- | ||
|
||
Elwood has two integration modes. Pick which one is right for you! {% .lead %} | ||
|
||
{% quick-links %} | ||
|
||
{% quick-link title="Standalone" icon="installation" href="#standalone" description="Setup Elwood as a standalone Next.js application." /%} | ||
|
||
{% quick-link title="Embedded" icon="lightbulb" href="#embedded" description="Integrate Elwood into your existing React application." /%} | ||
|
||
{% /quick-links %} | ||
|
||
## Standalone | ||
|
||
In standalone mode, Elwood runs as standalone Next.js application & Supabase project. This is the easiest way to get started with Elwood. | ||
|
||
### Prerequisites | ||
|
||
You'll need the following installed on your machine: | ||
|
||
- Git | ||
- Supabase CLI | ||
- Node.js (>=v20) | ||
- PNPM | ||
- Deno (optional) | ||
|
||
### Clone the repository | ||
|
||
```bash | ||
git clone https://github.com/elwood-software/elwood | ||
``` | ||
|
||
### Install dependencies | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
npm | ||
|
||
### Start Supabase | ||
|
||
```bash | ||
supabase start | ||
``` | ||
|
||
### Start Elwood | ||
|
||
```bash | ||
pnpm dev | ||
``` | ||
|
||
## Embedded | ||
|
||
You can integrate Elwood into your existing Next.js application. This is useful if you want to add Elwood to an existing project. | ||
|
||
### Install Elwood packages | ||
|
||
```bash | ||
pnpm install @elwood/react @elwood/ui @elwood/js | ||
``` | ||
|
||
### Add Elwood pages | ||
|
||
Elwood has a few pages you'll need to get your application up and running. | ||
|
||
#### Layout | ||
|
||
`app/elwood/(dashboard)/layout.tsx` | ||
|
||
```typescript | ||
import {type PropsWithChildren} from 'react'; | ||
import AuthPage from '@/app/(unauthenticated)/auth/page'; | ||
import {RedirectType, redirect} from 'next/navigation'; | ||
import {ElwoodThemeProvider} from '@elwood/ui'; | ||
|
||
export default async function Layout( | ||
props: PropsWithChildren, | ||
): Promise<JSX.Element> { | ||
// | ||
// !! CHANGE !! | ||
// add your custom check for a user here | ||
// Elwood does not provide authentication flow | ||
// in Embedded mode | ||
// | ||
if (!user) { | ||
redirect('/login', RedirectType.replace); | ||
} | ||
|
||
return ( | ||
<ElwoodThemeProvider> | ||
<div className="flex flex-row w-screen h-screen">{props.children}</div> | ||
</ElwoodThemeProvider> | ||
); | ||
} | ||
|
||
``` | ||
|
||
#### Dashboard page | ||
|
||
`app/elwood/(dashboard)/[[...slug]]/page.tsx` | ||
|
||
```typescript | ||
'use client'; | ||
|
||
import React, {useEffect, useState} from 'react'; | ||
import { | ||
Router, | ||
createBrowserRouter, | ||
dashboardRoutes, | ||
type RouterProps, | ||
} from '@elwood/react'; | ||
import {type ElwoodClient, createClient} from '@elwood/js'; | ||
import {Spinner} from '@elwood/ui'; | ||
|
||
export default function Page(): JSX.Element { | ||
const [client, setClient] = useState<ElwoodClient | null>(null); | ||
const [router, setRouter] = useState<RouterProps['router'] | null>(null); | ||
|
||
useEffect(() => { | ||
setClient(createClient()); | ||
setRouter( | ||
createBrowserRouter(dashboardRoutes, { | ||
basename: `/`, | ||
}), | ||
); | ||
}, []); | ||
|
||
if (!router || !client) { | ||
return <Spinner full />; | ||
} | ||
|
||
return ( | ||
<ElwoodProvider workspaceName="Dunder Mifflin" client={props.client}> | ||
<Router router={router} /> | ||
</ElwoodProvider> | ||
); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,47 @@ | ||
--- | ||
title: Getting started | ||
title: Elwood Documentation | ||
--- | ||
|
||
Learn how to get CacheAdvance set up in your project in under thirty minutes or it's free. {% .lead %} | ||
The open source Dropbox alternative with Lighting fast, resumable uploads. Real-time, multi-user collaboration. Powerful role-based sharing. AI powered assistant (to the) file manager. {% .lead %} | ||
|
||
{% quick-links %} | ||
|
||
{% quick-link title="Installation" icon="installation" href="/" description="Step-by-step guides to setting up your system and installing the library." /%} | ||
{% quick-link title="Getting Started" icon="installation" href="/docs/getting-started" description="Step-by-step guides to setting up Elwood." /%} | ||
|
||
{% quick-link title="Architecture guide" icon="presets" href="/" description="Learn how the internals work and contribute." /%} | ||
|
||
{% quick-link title="Plugins" icon="plugins" href="/" description="Extend the library with third-party plugins or write your own." /%} | ||
|
||
{% quick-link title="API reference" icon="theming" href="/" description="Learn to easily customize and modify your app's visual design to fit your brand." /%} | ||
{% quick-link title="Support" icon="lightbulb" href="/docs/support" description="You've got Questions, we've got answers." /%} | ||
|
||
{% /quick-links %} | ||
|
||
Possimus saepe veritatis sint nobis et quam eos. Architecto consequatur odit perferendis fuga eveniet possimus rerum cumque. Ea deleniti voluptatum deserunt voluptatibus ut non iste. | ||
|
||
--- | ||
|
||
## Quick start | ||
|
||
Sit commodi iste iure molestias qui amet voluptatem sed quaerat. Nostrum aut pariatur. Sint ipsa praesentium dolor error cumque velit tenetur. | ||
|
||
### Installing dependencies | ||
|
||
Sit commodi iste iure molestias qui amet voluptatem sed quaerat. Nostrum aut pariatur. Sint ipsa praesentium dolor error cumque velit tenetur quaerat exercitationem. Consequatur et cum atque mollitia qui quia necessitatibus. | ||
|
||
```shell | ||
npm install @tailwindlabs/cache-advance | ||
``` | ||
|
||
Possimus saepe veritatis sint nobis et quam eos. Architecto consequatur odit perferendis fuga eveniet possimus rerum cumque. Ea deleniti voluptatum deserunt voluptatibus ut non iste. Provident nam asperiores vel laboriosam omnis ducimus enim nesciunt quaerat. Minus tempora cupiditate est quod. | ||
|
||
{% callout type="warning" title="Oh no! Something bad happened!" %} | ||
This is what a disclaimer message looks like. You might want to include inline `code` in it. Or maybe you’ll want to include a [link](/) in it. I don’t think we should get too carried away with other scenarios like lists or tables — that would be silly. | ||
{% /callout %} | ||
|
||
### Configuring the library | ||
|
||
Sit commodi iste iure molestias qui amet voluptatem sed quaerat. Nostrum aut pariatur. Sint ipsa praesentium dolor error cumque velit tenetur quaerat exercitationem. Consequatur et cum atque mollitia qui quia necessitatibus. | ||
|
||
```js | ||
// cache-advance.config.js | ||
export default { | ||
strategy: 'predictive', | ||
engine: { | ||
cpus: 12, | ||
backups: ['./storage/cache.wtf'], | ||
}, | ||
} | ||
``` | ||
|
||
Possimus saepe veritatis sint nobis et quam eos. Architecto consequatur odit perferendis fuga eveniet possimus rerum cumque. Ea deleniti voluptatum deserunt voluptatibus ut non iste. Provident nam asperiores vel laboriosam omnis ducimus enim nesciunt quaerat. Minus tempora cupiditate est quod. | ||
|
||
{% callout title="You should know!" %} | ||
This is what a disclaimer message looks like. You might want to include inline `code` in it. Or maybe you’ll want to include a [link](/) in it. I don’t think we should get too carried away with other scenarios like lists or tables — that would be silly. | ||
Elwood is currently in public BETA. We are actively developing and improving the code & documentation. If you have any questions, please reach out to us at [[email protected]](mailto:[email protected]). | ||
{% /callout %} | ||
|
||
--- | ||
|
||
## Basic usage | ||
|
||
Praesentium laudantium magni. Consequatur reiciendis aliquid nihil iusto ut in et. Quisquam ut et aliquid occaecati. Culpa veniam aut et voluptates amet perspiciatis. Qui exercitationem in qui. Vel qui dignissimos sit quae distinctio. | ||
|
||
### Your first cache | ||
|
||
Minima vel non iste debitis. Consequatur repudiandae et quod accusamus sit molestias consequatur aperiam. Et sequi ipsa eum voluptatibus ipsam. Et quisquam ut. | ||
|
||
Qui quae esse aspernatur fugit possimus. Quam sed molestiae temporibus. Eum perferendis dignissimos provident ea et. Et repudiandae quasi accusamus consequatur dolore nobis. Quia reiciendis necessitatibus a blanditiis iste quia. Ut quis et amet praesentium sapiente. | ||
|
||
Atque eos laudantium. Optio odit aspernatur consequuntur corporis soluta quidem sunt aut doloribus. Laudantium assumenda commodi. | ||
|
||
### Clearing the cache | ||
|
||
Vel aut velit sit dolor aut suscipit at veritatis voluptas. Laudantium tempore praesentium. Qui ut voluptatem. | ||
|
||
Ea est autem fugiat velit esse a alias earum. Dolore non amet soluta eos libero est. Consequatur qui aliquam qui odit eligendi ut impedit illo dignissimos. | ||
|
||
Ut dolore qui aut nam. Natus temporibus nisi voluptatum labore est ex error vel officia. Vero repellendus ut. Suscipit voluptate et placeat. Eius quo corporis ab et consequatur quisquam. Nihil officia facere dolorem occaecati alias deleniti deleniti in. | ||
|
||
### Adding middleware | ||
|
||
Officia nobis tempora maiores id iusto magni reprehenderit velit. Quae dolores inventore molestiae perspiciatis aut. Quis sequi officia quasi rem officiis officiis. Nesciunt ut cupiditate. Sunt aliquid explicabo enim ipsa eum recusandae. Vitae sunt eligendi et non beatae minima aut. | ||
|
||
Harum perferendis aut qui quibusdam tempore laboriosam voluptatum qui sed. Amet error amet totam exercitationem aut corporis accusantium dolorum. Perspiciatis aut animi et. Sed unde error ut aut rerum. | ||
|
||
Ut quo libero aperiam mollitia est repudiandae quaerat corrupti explicabo. Voluptas accusantium sed et doloribus voluptatem fugiat a mollitia. Numquam est magnam dolorem asperiores fugiat. Soluta et fuga amet alias temporibus quasi velit. Laudantium voluptatum perspiciatis doloribus quasi facere. Eveniet deleniti veniam et quia veritatis minus veniam perspiciatis. | ||
|
||
--- | ||
|
||
## Getting help | ||
|
||
Consequuntur et aut quisquam et qui consequatur eligendi. Necessitatibus dolorem sit. Excepturi cumque quibusdam soluta ullam rerum voluptatibus. Porro illo sequi consequatur nisi numquam nisi autem. Ut necessitatibus aut. Veniam ipsa voluptatem sed. | ||
|
||
### Submit an issue | ||
## What is Elwood? | ||
|
||
Inventore et aut minus ut voluptatem nihil commodi doloribus consequatur. Facilis perferendis nihil sit aut aspernatur iure ut dolores et. Aspernatur odit dignissimos. Aut qui est sint sint. | ||
Elwood is an open source Dropbox alternative. | ||
|
||
Facere aliquam qui. Dolorem officia ipsam adipisci qui molestiae. Error voluptatem reprehenderit ex. | ||
- ✔️ Lighting fast, resumable uploads | ||
- ✔️ Real-time, multi-user collaboration | ||
- ✔️ Simple user management | ||
- ✔️ File previews for images, videos, and documents (text, pdf, markdown) | ||
- Public link sharing | ||
- Role-based access control (RBAC) | ||
- Unified search with external providers (S3, Dropbox, Box, Google Drive, etc) | ||
- AI chat based file manager assistant | ||
- Zero knowledge, end-to-end encrypted file storage | ||
- Desktop app | ||
- Mobile app | ||
|
||
Consequatur enim quia maiores aperiam et ipsum dicta. Quam ut sit facere sit quae. Eligendi veritatis aut ut veritatis iste ut adipisci illo. | ||
## Contribute | ||
|
||
### Join the community | ||
Want to contribute to Elwood? We'd love your help! Check out our [Contributing Guide](/docs/contributing) to get started. | ||
|
||
Praesentium facilis iste aliquid quo quia a excepturi. Fuga reprehenderit illo sequi voluptatem voluptatem omnis. Id quia consequatur rerum consectetur eligendi et omnis. Voluptates iusto labore possimus provident praesentium id vel harum quisquam. Voluptatem provident corrupti. | ||
## Follow Us | ||
|
||
Eum et ut. Qui facilis est ipsa. Non facere quia sequi commodi autem. Dicta autem sit sequi omnis impedit. Eligendi amet dolorum magnam repudiandae in a. | ||
Want to stay up to date on all the latest Elwood news and updates? | ||
|
||
Molestiae iusto ut exercitationem dolorem unde iusto tempora atque nihil. Voluptatem velit facere laboriosam nobis ea. Consequatur rerum velit ipsum ipsam. Et qui saepe consequatur minima laborum tempore voluptatum et. Quia eveniet eaque sequi consequatur nihil eos. | ||
- Watch us on [Github](https://github.com/elwood-software/elwood) | ||
- Follow us on [Twitter](https://twitter.com/hello_elwood) | ||
- Join us on [Discord](https://discord.gg/mkhKk5db) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Support | ||
--- | ||
|
||
We are here to help! Reach out with any questions, concerns, favorite "The Office" quotes, or just say "Hello!" {% .lead %} | ||
|
||
{% quick-links %} | ||
|
||
{% quick-link title="Forums" icon="lightbulb" href="https://github.com/orgs/elwood-software/discussions" description="The best place to get answers to all your questions" /%} | ||
|
||
{% quick-link title="Discord" icon="lightbulb" href="https://discord.gg/mkhKk5db" description="Join the community" /%} | ||
|
||
{% quick-link title="Bug Report" icon="lightbulb" href="https://github.com/elwood-software/elwood/issues" description="Found a bug... Open an Issue" /%} | ||
|
||
{% quick-link title="Email" icon="lightbulb" href="mailto:[email protected]" description="Old school is the best school" /%} | ||
|
||
{% /quick-links %} |
Oops, something went wrong.