Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to app/ directory #130

Draft
wants to merge 164 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
0405f82
switch to pnpm
MaxLeiter Nov 8, 2022
0a5a2ad
dep improvements, style fixes, next/link codemod
MaxLeiter Nov 8, 2022
6b2b8b8
server: upgrade sqlite
MaxLeiter Nov 8, 2022
da870d6
next-themes work, add index app/ page
MaxLeiter Nov 9, 2022
9b9c3c1
start api transition, prisma additions
MaxLeiter Nov 10, 2022
95d1ef3
rework cookies
MaxLeiter Nov 10, 2022
cf7d89e
cookies fixes, hook improvement, more porting
MaxLeiter Nov 10, 2022
8b0b172
convert admin, run lint
MaxLeiter Nov 10, 2022
68570b3
bump next, fix background color flash
MaxLeiter Nov 12, 2022
7c761eb
actually bump next
MaxLeiter Nov 12, 2022
60d1b03
use next-auth, add sign in via github, switch to postgres
MaxLeiter Nov 12, 2022
96c4023
migrate post page and create post api, misc changes
MaxLeiter Nov 12, 2022
96da958
colocate components
MaxLeiter Nov 12, 2022
86b9172
fix up colocation
MaxLeiter Nov 12, 2022
096cf41
gen prisma migration, fix up rendering html (somewhat) in RSC
MaxLeiter Nov 12, 2022
c41cf7c
rm server code, add markdown rendering, html saving, visibility updating
MaxLeiter Nov 13, 2022
ecd4521
refactor getting html for files and previews
MaxLeiter Nov 13, 2022
733a93d
dep management
MaxLeiter Nov 13, 2022
5f4749e
radix tooltip, move header to layout
MaxLeiter Nov 13, 2022
97cff7e
use custom badge component, add post deletion
MaxLeiter Nov 14, 2022
0627ab7
fix raw file viewing, rm password from settings, add admin api
MaxLeiter Nov 14, 2022
2b78314
fix admin page, expiring view, displayName setting/field
MaxLeiter Nov 14, 2022
f819992
health check API route
MaxLeiter Nov 14, 2022
2b36e3c
fix admin 404
MaxLeiter Nov 14, 2022
c31b911
md table styles, expiration post fixes, dont render linenumbers
MaxLeiter Nov 15, 2022
c5e276b
rm old constants
MaxLeiter Nov 15, 2022
bc2a4ac
Fix admin page styling and user table
MaxLeiter Nov 15, 2022
8e7828d
fix middleware, migrate gist importing
MaxLeiter Nov 15, 2022
e1ef002
move react-datepicker.css
MaxLeiter Nov 15, 2022
37d4dfe
fix building
MaxLeiter Nov 15, 2022
aef1788
rm server/
MaxLeiter Nov 15, 2022
2c3e271
only run prisma admin middleware if enable_admin
MaxLeiter Nov 15, 2022
3bebb6a
README updates
MaxLeiter Nov 15, 2022
bff7c90
Convert card from geist, badge style improvements
MaxLeiter Nov 16, 2022
dfe0d39
remove next-themes, convert header to custom button
MaxLeiter Nov 16, 2022
45c2e59
use custom input/buttons on postlist/new page
MaxLeiter Nov 16, 2022
3c5dcc2
Custom tabs
MaxLeiter Nov 16, 2022
4cf448c
more geist removal; add popover, convert more of post editing and vie…
MaxLeiter Nov 16, 2022
12d9eaf
lint
MaxLeiter Nov 18, 2022
8fe7299
fix error badge color
MaxLeiter Nov 18, 2022
881e693
title: don't re-render when updating post
MaxLeiter Nov 18, 2022
97e4742
bump next, use custom tabs on /home
MaxLeiter Nov 21, 2022
41ed505
fix preview rendering on /home, fix signout redirect
MaxLeiter Nov 21, 2022
0cab3ac
enforce label or aria-label on input props
MaxLeiter Nov 21, 2022
d6894ff
remove more of geist-ui: add spinner, button dropdown, toasts. bump deps
MaxLeiter Nov 29, 2022
8048e99
Fix linting issues
MaxLeiter Nov 29, 2022
a7660f6
add prisma to reg deps
MaxLeiter Nov 29, 2022
1d7db6e
rm vscode settings
MaxLeiter Nov 29, 2022
23b7343
bump lockfile
MaxLeiter Nov 29, 2022
fc79f7d
bump next, use next-themes, remove geist icons and most of geist core
MaxLeiter Nov 29, 2022
ce0c442
Remove geist-ui, add loading prop to button, convert header to CSS
MaxLeiter Nov 30, 2022
44a05f6
fix /new
MaxLeiter Nov 30, 2022
8578714
Fix SSG by moving auth from root layout
MaxLeiter Dec 2, 2022
9b593c8
Bump next and next-themes
MaxLeiter Dec 2, 2022
56eefc8
add basic admin page, misc fixes
MaxLeiter Dec 4, 2022
7eeadbe
Add basic /author/{id} page
MaxLeiter Dec 4, 2022
330dbd8
bump next-themes
MaxLeiter Dec 4, 2022
a84dad1
Update readme to mention refactor branch
MaxLeiter Dec 4, 2022
72633c6
More uniform home page spacing, close mobile menu on click
MaxLeiter Dec 4, 2022
5918b13
lint
MaxLeiter Dec 4, 2022
7ef45c2
Add public post listing to home page
MaxLeiter Dec 4, 2022
aee2330
Fix building by addressing missing labels/props for inputs
MaxLeiter Dec 6, 2022
7021223
rename client to src
MaxLeiter Dec 10, 2022
350575c
intentionally break post rendering
MaxLeiter Dec 16, 2022
f034f29
bump react-hot-toasts to beta
MaxLeiter Dec 16, 2022
ff310a6
Page/layout optimizations, bump next, styling fixes
MaxLeiter Dec 18, 2022
34a92a2
Fix /new/from posts
MaxLeiter Dec 18, 2022
69c482a
Switch post html/content to Bytes from Text
MaxLeiter Dec 18, 2022
82aadd9
Use Prisma type utils
MaxLeiter Dec 18, 2022
0631ae3
Fix more types
MaxLeiter Dec 18, 2022
65cf59e
Add credentials provider, fix header active style
MaxLeiter Dec 18, 2022
447974a
Add deleting users to admin, refactor auth
MaxLeiter Dec 18, 2022
3e199cf
remove unnecessary comment
MaxLeiter Dec 18, 2022
5e976bf
Fix export from segment config
MaxLeiter Dec 18, 2022
23a8502
File styling adjustments
MaxLeiter Dec 18, 2022
f07f478
cleanup view-document styling in jsx
MaxLeiter Dec 18, 2022
a97ba1b
Default credential auth to true, readme updates
MaxLeiter Dec 18, 2022
631f98a
Add @next/font, increase markdown legibility
MaxLeiter Dec 19, 2022
19c5725
Add eslint configs, fix lint errors
MaxLeiter Dec 19, 2022
e4b215b
Fix post-list linting
MaxLeiter Dec 19, 2022
e41dc29
Center icon and text in post list li
MaxLeiter Dec 19, 2022
b848aa9
Style improvements, re-enable themes, bump next
MaxLeiter Dec 26, 2022
604f5d6
post/[id]: move function to new file to avoid invalid-segment-export
MaxLeiter Dec 26, 2022
6aa5301
lib/server: move making 1st user admin to next auth event
MaxLeiter Dec 26, 2022
69a40df
remove unnecessary CSS and !importants
MaxLeiter Dec 26, 2022
0269534
formatting icons: refactor CSS/remove borders
MaxLeiter Dec 26, 2022
b9ab0df
Some styling fixes, potentially fix building w/ docker
MaxLeiter Dec 29, 2022
98ad33b
API tokens
MaxLeiter Jan 6, 2023
c21ca52
README: fix logo path
MaxLeiter Jan 6, 2023
d9e7aa5
Bug fixes, code cleanup, made root dir /
MaxLeiter Jan 7, 2023
6bbd380
Rm use-session
MaxLeiter Jan 7, 2023
371dae2
README updates for `src` refactor
MaxLeiter Jan 7, 2023
c51ca39
Eslint changes and linting (no-mix-spaces)
MaxLeiter Jan 7, 2023
6148f8d
Switch default buttonType to secondary
MaxLeiter Jan 7, 2023
a6c8c8c
Fix signing into correct user with credentials
MaxLeiter Jan 7, 2023
6b0a6bf
Fix showing password prompt for unauthed protected posts
MaxLeiter Jan 7, 2023
6fb81d7
Fix building error
MaxLeiter Jan 7, 2023
ba732dc
refactor to SWR and verifyApiUser; personal post search is broken
MaxLeiter Jan 13, 2023
e49ca2e
Linting, component clean up
MaxLeiter Jan 13, 2023
5b7efc8
Fix post searching
MaxLeiter Jan 13, 2023
7c8e2c9
Remove unused params
MaxLeiter Jan 13, 2023
ba09215
remove use of VERCEL_URL
MaxLeiter Jan 13, 2023
16b4a5a
Re-implement public search
MaxLeiter Jan 13, 2023
f5e2fd3
Bump next.js to 13.1.2 stable
MaxLeiter Jan 13, 2023
acfcc04
Apply proper align-items to tabs on small screens
MaxLeiter Jan 13, 2023
be73154
some file cleanup, add api/og function
MaxLeiter Jan 24, 2023
08abdd4
bump deps
MaxLeiter Jan 29, 2023
41a7a90
unstable_getServerSession -> getServerSession
MaxLeiter Jan 29, 2023
3048d84
Add stack component
MaxLeiter Jan 29, 2023
1acbb52
Add react-loading-boundary and error component
MaxLeiter Jan 29, 2023
a64cc78
Add loading.tsx for mine
MaxLeiter Jan 29, 2023
f3d588c
button style improvements, homepage and navbar refactors
MaxLeiter Jan 29, 2023
eda977b
ts fixes
MaxLeiter Jan 29, 2023
c813ffa
convert datepicker to next/dynamic
MaxLeiter Jan 29, 2023
98cbbf2
Add suspense boundar around useSearchParams
MaxLeiter Jan 29, 2023
b5b4bf0
Fix post creation/text input
MaxLeiter Jan 29, 2023
072516b
temporarily switch to /api/ route for raw files
MaxLeiter Feb 22, 2023
64cfe90
Add (unworking) route handler for raw files
MaxLeiter Feb 22, 2023
e51815e
Bump next.js and related deps
MaxLeiter Feb 22, 2023
817a12f
Add .env.default, support VERCEL_URL in lib/config
MaxLeiter Feb 22, 2023
9a811e8
chore: lint
MaxLeiter Feb 22, 2023
e21d896
Improve list item skeleton on desktop
MaxLeiter Feb 22, 2023
fec58f2
dep bumps, add pages feature, bug fixes, type improvements
MaxLeiter Feb 24, 2023
86c2fb4
mobile header improvements
MaxLeiter Feb 24, 2023
a5704e0
@next/font -> next/font
MaxLeiter Feb 24, 2023
d1e5dca
markdown: use --link for link color
MaxLeiter Feb 24, 2023
0b6d313
Add toast for revoked api key
MaxLeiter Feb 24, 2023
f2d42a6
Add ErrorBoundary to /mine, remove header underline
MaxLeiter Feb 24, 2023
afd18d1
Remove /home rewrite, replace with page
MaxLeiter Feb 24, 2023
6d18490
Switch to new Metadata API
MaxLeiter Feb 25, 2023
88c65f2
Bump deps
MaxLeiter Feb 26, 2023
aaf2761
add total-typescript ts-reset
MaxLeiter Feb 26, 2023
cc22156
lint, internally refactor header
MaxLeiter Feb 26, 2023
85f21bf
Add cmdk, nested postcss
MaxLeiter Feb 26, 2023
590cc51
Migrate some CSS to nested
MaxLeiter Feb 26, 2023
806b173
Make CmdK dynamic
MaxLeiter Feb 26, 2023
9c3375c
Add shell script for uploading files to drift
MaxLeiter Feb 26, 2023
b64281b
Slight shell script improvements
MaxLeiter Feb 26, 2023
86e323f
Add some (WIP) tests
MaxLeiter Feb 26, 2023
6cf544f
opt-out tests-backup from eslint/tsc
MaxLeiter Feb 26, 2023
27a604d
fix building by adjusting types
MaxLeiter Feb 26, 2023
a54a22f
chore: linting
MaxLeiter Feb 26, 2023
3041da8
Fix useSessionSWR() expecting Drift's API interface instead of next-a…
MaxLeiter Feb 27, 2023
cb7d9eb
Bump next.js and deps
MaxLeiter Mar 2, 2023
68fc679
SSR theme and auth in header. Move auth check to middleware. Bump next
MaxLeiter Mar 28, 2023
7887b42
components/header: rm memo from RSC (#141)
MaxLeiter Mar 28, 2023
3433371
feat: add keycloak login (#139)
qwertzdenek Mar 28, 2023
55e1938
fix: add keys to header buttons (#142)
qwertzdenek Mar 28, 2023
d0a73a7
fix sign out, theme switch, auth provider icons
MaxLeiter Apr 14, 2023
0f58c44
fix: build errors (#145)
qwertzdenek May 13, 2023
5e4ecbb
Fix `isAdmin` check to be by role and not uid (#147)
examknow May 20, 2023
dc11f8e
bump next and deps, fix header buttons
MaxLeiter May 20, 2023
c416f5d
migrate header info back to client-side
MaxLeiter May 20, 2023
a1fa7db
remove @vercel/og, use bundled package
MaxLeiter May 20, 2023
69ca511
revalidate home page
MaxLeiter May 20, 2023
504d274
post-list <li> a11y improvements
MaxLeiter May 20, 2023
7f4745a
Add loading fallback state for date picker
MaxLeiter May 21, 2023
0df8577
Bump next
MaxLeiter May 26, 2023
41e72ba
Bump next
MaxLeiter May 30, 2023
702f59c
Add systemd units (#148)
TehPeGaSuS Jun 10, 2023
5d5fd31
Shadify (#150)
MaxLeiter Jul 21, 2023
bff0dbe
Bump word-wrap from 1.2.3 to 1.2.4 (#151)
dependabot[bot] Jul 21, 2023
563136f
fix markdown checkbox colors
MaxLeiter Jul 21, 2023
0c20460
/new page responsiveness
MaxLeiter Jul 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
DATABASE_URL=postgresql://user:password@localhost:5432/dbname

# Optional if you use Vercel (defaults to VERCEL_URL).
# Necessary in development unless you use the vercel CLI (`vc dev`)
DRIFT_URL=http://localhost:3000

# Optional: The first user becomes an admin. Defaults to false
ENABLE_ADMIN=false

# Required: Next auth secret is a required valid JWT secret. You can generate one with `openssl rand -hex 32`
NEXTAUTH_SECRET=7f8b8b5c5e5f5e5f5e5f5e5f5e5f5e5f5e5f5e5f5e5f5e5f5e5f5e5f5e5f5f5

# Required: but unnecessary if you use a supported host like Vercel
NEXTAUTH_URL=http://localhost:3000

# Optional: for locking your instance
REGISTRATION_PASSWORD=

# Optional: for if you want GitHub oauth. Currently incompatible with the registration password
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# Optional: if you want Keycloak oauth. Currently incompatible with the registration password
KEYCLOAK_ID=
KEYCLOAK_SECRET=
KEYCLOAK_ISSUER= # keycloak path including realm
KEYCLOAK_NAME=

# Optional: if you want to support credential auth (username/password, supports registration password)
# Defaults to true
CREDENTIAL_AUTH=true

# Optional:
WELCOME_CONTENT=
WELCOME_TITLE=
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
"ignorePatterns": [
"node_modules/",
"__tests__/",
"coverage/",
".next/",
"public"
],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error"
}
}
36 changes: 35 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
analyze

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# production env
.env

# vercel
.vercel
drift.sqlite

# typescript
*.tsbuildinfo
3 changes: 2 additions & 1 deletion server/.prettierrc → .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"trailingComma": "none",
"singleQuote": false,
"printWidth": 80,
"useTabs": true
"useTabs": true,
"plugins": ["prettier-plugin-tailwindcss"]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"typescript.tsdk": "node_modules/.pnpm/[email protected]/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"dotenv.enableAutocloaking": false
}
135 changes: 94 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# <img src="client/public/assets/logo.png" height="32px" alt="" /> Drift
# <img src="src/public/assets/logo.png" height="32px" alt="" /> Drift

Drift is a self-hostable Gist clone. It's also a major work-in-progress, but is completely functional.
> **Note:** This branch is where all work is being done to refactor to the Next.js 13 app directory and React Server Components.

You can try a demo at https://drift.maxleiter.com. The demo is built on master but has no database, so files and accounts can be wiped at any time.
Drift is a self-hostable Gist clone. It's in beta, but is completely functional.

You can try a demo at https://drift.lol. The demo is built on main but has no database, so files and accounts can be wiped at any time.

If you want to contribute, need support, or want to stay updated, you can join the IRC channel at #drift on irc.libera.chat or [reach me on twitter](https://twitter.com/Max_Leiter). If you don't have an IRC client yet, you can use a webclient [here](https://demo.thelounge.chat/#/connect?join=%23drift&nick=drift-user&realname=Drift%20User).

Drift is built with Next.js 13, React Server Components, [shadcn/ui](https://github.com/shadcn/ui), and [Prisma](https://prisma.io/).

If you want to contribute, need support, or want to stay updated, you can join the IRC channel at #drift on irc.libera.chat or [reach me on twitter](https://twitter.com/Max_Leiter). If you don't have an IRC client yet, you can use a webclient [here](https://demo.thelounge.chat/#/connect?join=%23drift&nick=drift-user&realname=Drift%20User).
<hr />

**Contents:**

- [Setup](#setup)
- [Development](#development)
- [Production](#production)
Expand All @@ -20,75 +26,122 @@ If you want to contribute, need support, or want to stay updated, you can join t

### Development

In both `server` and `client`, run `yarn` (if you need yarn, you can download it [here](https://yarnpkg.com/).)
You can run `yarn dev` in either / both folders to start the server and client with file watching / live reloading.
In the root directory, run `pnpm i`. If you need `pnpm`, you can download it [here](https://pnpm.io/installation).
You can run `pnpm dev` in `client` for file watching and live reloading.

To migrate the sqlite database in development, you can use `yarn migrate` to see a list of options.
To work with [prisma](prisma.io/), you can use `pnpm prisma` or `pnpm exec prisma` to interact with the database.

### Production

`yarn build` in both `client/` and `server/` will produce production code for the client and server respectively.

If you're deploying the front-end to something like Vercel, you'll need to set the root folder to `client/`.

In production the sqlite database will be automatically migrated to the latest version.
`pnpm build` will produce production code. `pnpm start` will start the Next.js server.

### Environment Variables

You can change these to your liking.

`client/.env`:

- `API_URL`: defaults to localhost:3001, but allows you to host the front-end separately from the backend on a service like Vercel or Netlify
- `SECRET_KEY`: a secret key used for validating API requests that is never exposed to the browser

`server/.env`:
`.env`:

- `PORT`: the default port to start the server on (3000 by default)
- `NODE_ENV`: defaults to development, can be `production`
- `JWT_SECRET`: a secure token for JWT tokens. You can generate one [here](https://www.grc.com/passwords.htm).
- `MEMORY_DB`: if `true`, a sqlite database will not be created and changes will only exist in memory. Mainly for the demo.
- `REGISTRATION_PASSWORD`: if `true`, the user will be required to provide this password to sign-up, in addition to their username and account password. If it's not set, no additional password will be required.
- `SECRET_KEY`: the same secret key as the client
- `DRIFT_URL`: the URL of the drift instance.
- `DATABASE_URL`: the URL to connect to your postgres instance. For example, `postgresql://user:password@localhost:5432/drift`.
- `WELCOME_CONTENT`: a markdown string that's rendered on the home page
- `WELCOME_TITLE`: the file title for the post on the homepage.
- `ENABLE_ADMIN`: the first account created is an administrator account
- `DRIFT_HOME`: defaults to ~/.drift, the directory for storing the database and eventually images
- `REGISTRATION_PASSWORD`: the password required to register an account. If not set, no password is required.
- `NODE_ENV`: defaults to development, can be `production`

#### Auth environment variables

**Note:** Only credential auth currently supports the registration password, so if you want to secure registration, you must use only credential auth.

- `GITHUB_CLIENT_ID`: the client ID for GitHub OAuth.
- `GITHUB_CLIENT_SECRET`: the client secret for GitHub OAuth.
- `NEXTAUTH_URL`: the URL of the drift instance. Not required if hosting on Vercel.
- `CREDENTIAL_AUTH`: whether to allow username/password authentication. Defaults to `true`.

## Running with pm2

It's easy to start Drift using [pm2](https://pm2.keymetrics.io/).
First, add `.env` files to `client/` and `server/` with the values you want (see the above section for possible values).
Then, use the following commands to start the client and server:
First, add the `.env` file with your values (see the above section for the required options).

- `cd server && yarn build && pm2 start yarn --name drift-server --interpreter bash -- start`
- `cd ..`
- `cd client && yarn build && pm2 start yarn --name drift-client --interpreter bash -- start`
Then, use the following command to start the server:

You now use `pm2 ls` to see their statuses. Refer to pm2's docs or `pm2 help` for more information.
- `pnpm build && pm2 start pnpm --name drift --interpreter bash -- start`

## Running with Docker
Refer to pm2's docs or `pm2 help` for more information.

The client and server each have Dockerfiles ([client](https://github.com/MaxLeiter/Drift/blob/main/client/Dockerfile), [server](https://github.com/MaxLeiter/Drift/blob/main/server/Dockerfile)) you can use with a docker-compose; an example compose [is provided in the repository](https://github.com/MaxLeiter/Drift/blob/main/docker-compose.yml). It's recommended you pair running them with nginx or another reverse proxy. Also review the environment variables above and configure them to your liking.
## Running with Docker

## Running with systemd

_**NOTE:** We assume that you know how to enable user lingering if you don't want to use the systemd unit as root_

- As root
- Place the following systemd unit in ___/etc/systemd/system___ and name it _drift.service_
- Replace any occurrence of ___`$USERNAME`___ with the shell username of the user that will be running the Drift server

```
##########
# Drift Systemd Unit (Global)
##########
[Unit]
Description=Drift Server (Global)
After=default.target

[Service]
User=$USERNAME
Group=$USERNAME
Type=simple
WorkingDirectory=/home/$USERNAME/Drift
ExecStart=/usr/bin/pnpm start
Restart=on-failure

[Install]
WantedBy=default.target
```
- As a nomal user
- Place the following systemd unit inside ___/home/user/.config/systemd/user___ and name it _drift_user.service_
- Replace any occurrence of ___`$USERNAME`___ with the shell username of the user that will be running the Drift server

```
##########
# Drift Systemd Unit (User)
##########
[Unit]
Description=Drift Server (User)
After=default.target

[Service]
Type=simple
WorkingDirectory=/home/$USERNAME/Drift
ExecStart=/usr/bin/pnpm start
Restart=on-failure

[Install]
WantedBy=default.target
```

## Current status

Drift is a major work in progress. Below is a (rough) list of completed and envisioned features. If you want to help address any of them, please let me know regardless of your experience and I'll be happy to assist.
Drift is a work in progress. Below is a (rough) list of completed and envisioned features. If you want to help address any of them, please let me know regardless of your experience and I'll be happy to assist.

- [x] creating and sharing private, public, unlisted posts
- [x] syntax highlighting (detected by file extension)
- [x] multiple files per post
- [x] uploading files via drag-and-drop
- [x] Next.js 13 `app` directory
- [x] creating and sharing private, public, password-protected, and unlisted posts
- [x] syntax highlighting
- [x] expiring posts
- [x] responsive UI
- [x] user auth
- [ ] SSO via HTTP header (Issue: [#11](https://github.com/MaxLeiter/Drift/issues/11))
- [x] SSO via GitHub OAuth
- [x] downloading files (individually and entire posts)
- [x] password protected posts
- [x] sqlite database
- [ ] administrator account / settings
- [x] postgres database
- [x] administrator account / settings
- [x] docker-compose (PRs: [#13](https://github.com/MaxLeiter/Drift/pull/13), [#75](https://github.com/MaxLeiter/Drift/pull/75))
- [ ] publish docker builds
- [ ] user settings
- [ ] works enough with JavaScript disabled
- [x] documentation
- [ ] in-depth documentation
- [x] customizable homepage, so the demo can exist as-is but other instances can be built from the same source. Environment variable for the file contents?
- [ ] fleshed out API
- [ ] Swappable database backends
- [ ] More OAuth providers
2 changes: 0 additions & 2 deletions client/.env.local

This file was deleted.

3 changes: 0 additions & 3 deletions client/.eslintrc.json

This file was deleted.

35 changes: 0 additions & 35 deletions client/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions client/.prettierrc

This file was deleted.

34 changes: 0 additions & 34 deletions client/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions client/components/Link.tsx

This file was deleted.

Loading