Drift is a self-hostable Gist alternative and paste service

Overview

Drift

Drift is a self-hostable Gist clone. It's also a major work-in-progress, but is (almost, no database yet) completely functional.

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.

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. If you don't have an IRC client yet, you can use a webclient here.

Setup

Development

In both server and client, run yarn (if you need yarn, you can download it here.) You can run yarn dev in either / both folders to start the server and client with file watching / live reloading.

Production

Note: Drift is not yet ready for production usage and should not be used seriously until the database has been setup, which I'll get to when the server API is semi stable.

yarn build in both client/ and server/ will produce production code for the client and server respectively. The client and server each also have Dockerfiles which you can use with a docker-compose (an example compose will be provided in the near future).

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

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.

  • creating and sharing private, public, unlisted posts
    • syntax highlighting (detected by file extension)
    • multiple files per post
    • uploading files via drag-and-drop
  • responsive UI
  • user auth
    • SSO via HTTP header (Issue: #11)
  • downloading files (individually and entire posts)
  • password protected posts
  • sqlite database (should be very easy to set-up; the ORM is just currently set to memory for ease of development)
  • non-node backend
  • administrator account / settings
  • docker-compose (PR: #13)
    • publish docker builds
  • user settings
  • works enough with JavaScript disabled
  • documentation
  • 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?
Comments
  • Private posts are actually unlisted

    Private posts are actually unlisted

    Describe the bug You can view private posts is if they are unlisted.

    To Reproduce Steps to reproduce the behavior:

    1. Create a private post and copy the link
    2. Open private browsing or another browser and go to the link.
    3. You will see the post.

    Expected behavior You shouldn't see the post

    bug 
    opened by icepaq 12
  • cleaned up multi-service compose

    cleaned up multi-service compose

    this is carryover from: https://github.com/MaxLeiter/Drift/pull/13

    gets the images built and containers running for both server and client. there is a server build issue in builder because it cant find .env:

    Step 13/24 : RUN yarn build ---> Running in ef5ee9eca9ee yarn run v1.22.18 $ mkdir -p ./dist && cp .env ./dist/.env && tsc -p ./tsconfig.json && tsc-alias -p ./tsconfig.json && yarn post-build cp: can't stat '.env': No such file or directory error Command failed with exit code 1.

    explicitly giving the image a duplicated .env.test -> .env allows the build to complete and create container. there is another issue that i ran into when loading the client at http://localhost:3001/:

    Something went wrong. Is the server running?

    and when navigating to: http://localhost:3001/signup

    client | Error: connect ECONNREFUSED 127.0.0.1:3000 client | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) { client | errno: -111, client | code: 'ECONNREFUSED', client | syscall: 'connect', client | address: '127.0.0.1', client | port: 3000 client | }

    viewing the server health at: http://localhost:3000/health

    status: "UP"

    opened by kinghat 10
  • refactor: improve the auth component

    refactor: improve the auth component

    here a little improvement from my side and a quick little note regarding your auth component.

    1. I tried to make it geist agnostic -> i do like geist but saw you want to shift away from it. The geist approach would be to use a Grid here but it is fine like that.
    2. You explicitly check for empty spaces or a set input through regex which does not make any sense while using such a UI lib. Even if you move to chakra or material ui or any other ui lib, it is handled for you and this type of input check should be on the backend side only then. However if you'd like to make some manual checks it is fine as well but for this case it is not really useful
    3. I would rather display a general toast regarding errors instead of printing the api response to the client, another option would be to use a Note (https://geist-ui.dev/en-us/components/note) above the login form.
    4. I reverted the auth button to be filled initially which is a bit user friendlier ui/ux wise

    feel free to make your changes and have fun on your project

    opened by boringContributor 10
  • Improve local development with a default envfile

    Improve local development with a default envfile

    Currently a new developer, with no previous configuration, would need to create a new server/.env file with a secret, matching the one in client/.env.local. This felt somewhat asymetric, so I wanted the first development experience to be the smoothes it can be.

    Given that the client/ already uses a default .env.local and logs:

    info  - Loaded env from D:\Workspace\Drift\client\.env.local
    

    Why shoudn't the server/?

    Alternatives

    Rather than having a .env.local, we could improve the first developer experience by having a default on all environment variables. Namely SECRET_KEY. But I would push for this default to be in both client/ and server/ and remove the client/.env.local.

    I was pondering if server/index.ts was where I wanted to add the complexity of loading a .env.local, or in server\src\lib\config.ts. I opted for the one that I felt more idiomatic to the code base, but I'm open to discussions

    opened by jazcarate 6
  • Fix empty spaces in sign-in/sign-up inputs

    Fix empty spaces in sign-in/sign-up inputs

    The title say it all but the front-end was allowing to create a user with empty username/password (I think its worth check in backend), I did a small refactor on handle submit too.

    And I created a reusable head component so we don't need to repeat some logic in every page.

    Let me know if it is good :)

    opened by sampaioxsamuel 6
  • Change post visibility

    Change post visibility

    Closes #64

    Again with my awful UI 😅 I tried aligning the buttons to the right, like the UX when creating. Cound't CSS 🙈. I tried the UX of having a ButtonDropdown but felt... off. Cant really explain.

    Test are missing. I know. I started with https://github.com/MaxLeiter/Drift/issues/79 but got a bit derailed with #64 😳

    Change you own post

    image

    A protected post

    image

    Seeing another user's post

    image

    Discussion point

    It is weird that the links to the posts depend on the visibility. Now that we can change it, links will break. Say I send you a link to http://drift/post/**protected**/91b769ab-b96e-4222-8501-95b0749a920e or http://drift.com/post/**private**/91b769ab-b96e-4222-8501-95b0749a920e, but then make it public; the old link will break. I think any visibility should check the post ID and redirect accordingly to the current visibility.

    opened by jazcarate 5
  • Import a single Gist by ID

    Import a single Gist by ID

    There are 2 "discussion points":

    Limitations

    1. Adding a gist with files larger than 10mb
    2. Adding a gist with more than 300 files

    The 1 is easy enough, as you can fetch the raw_url direct. The 2 is a bit tricky, as one should clone the git repo. I was not about to make the server clone a repo to get the 301th file 😅 so I opted to simply throw. We can improve on it later 🤷

    Gists to test these limits:

    1. Big file: https://gist.github.com/jazcarate/50bb04ad4904dc42dce512c10e9e0557
    2. Many files: https://gist.github.com/jazcarate/bf8b6ac8c82f09946e350814aa3c84a1

    Creation date

    I opted to import the creation date of a gist, but not the updated_at. It is a bit weird that you can import an old gist, and not see it in the /mine, but I felt it was more convenient to keep the created_at. We can make the creation date be the imported date. I don't have a good reason for either one 😸

    Pending

    A UI. I wanted to push this first part, discuss the endpoint, then make a bulk import (maybe a queue? so we don't overload the server. Or even push the fetching to the frontend 🤔)

    opened by jazcarate 5
  • Minor wording change for

    Minor wording change for "Download" link

    Suggesting this change simply because "ZIP" appears to be (per its specification published by PKWARE) canonically spelled uppercase.

    I also added the word "archive" to provide a noun modified by "ZIP" rather than treating "ZIP" as a noun itself. It seems clearer this way, but may cause text flow issues in the design if it's too long.

    opened by emilyst 5
  • Issue with uploading files

    Issue with uploading files

    Describe the bug A clear and concise description of what the bug is.

    To Reproduce Steps to reproduce the behaviour:

    1. Try uploading a file with an extension of .go or .mod
    2. Try uploading a large JSON

    Expected behaviour I would expect the upload to work since they are text files (and python files do work with .py). And the JSON is only 18MB, but it claims to be too large

    Screenshots Screenshot 2022-03-28 at 11 30 57 PM

    Screenshot 2022-03-28 at 11 31 22 PM
    ❯ ls -alh not_matched_x.json
    -rw-r--r--@ 1 adyah  staff    18M Jan 25 18:39 not_matched_x.json
    

    Desktop (please complete the following information):

    • OS: macOS
    • Browser Safari
    • Version 15.4

    Additional context Add any other context about the problem here.

    bug 
    opened by adyanth 4
  • install error: https://github.com/mapbox/node-sqlite3 tag not found

    install error: https://github.com/mapbox/node-sqlite3 tag not found

    Describe the bug

    [2/4] Fetching packages...
    error Couldn't find match for "918052b538b0effe6c4a44c74a16b2749c08a0d2" in "refs/heads/master,refs/heads/renovate/eslint-8.x,refs/heads/renovate/mocha-9.x,refs/heads/renovate/node-gyp-9.x,refs/heads/ubuntu18,refs/tags/0.0.2,refs/tags/0.0.3,refs/tags/0.0.6,refs/tags/1.0.0,refs/tags/1.0.1,refs/tags/1.0.2,refs/tags/1.0.3,refs/tags/2.0.0,refs/tags/2.0.1,refs/tags/2.0.10,refs/tags/2.0.11,refs/tags/2.0.12,refs/tags/2.0.13,refs/tags/2.0.2,refs/tags/2.0.3,refs/tags/2.0.4,refs/tags/2.0.5,refs/tags/2.0.6,refs/tags/2.0.7,refs/tags/2.0.8,refs/tags/2.0.9,refs/tags/v2.0.14,refs/tags/v2.0.15,refs/tags/v2.0.16,refs/tags/v2.0.17,refs/tags/v2.0.18,refs/tags/v2.1.0,refs/tags/v2.1.1,refs/tags/v2.1.10,refs/tags/v2.1.11,refs/tags/v2.1.12,refs/tags/v2.1.13,refs/tags/v2.1.14,refs/tags/v2.1.15,refs/tags/v2.1.16,refs/tags/v2.1.17,refs/tags/v2.1.18,refs/tags/v2.1.19,refs/tags/v2.1.3,refs/tags/v2.1.4,refs/tags/v2.1.5,refs/tags/v2.1.7,refs/tags/v2.1.7-alpha,refs/tags/v2.1.8,refs/tags/v2.1.9,refs/tags/v2.2.0,refs/tags/v2.2.0-alpha,refs/tags/v2.2.1,refs/tags/v2.2.3,refs/tags/v2.2.4,refs/tags/v2.2.5,refs/tags/v2.2.6,refs/tags/v3.0.0,refs/tags/v3.0.1,refs/tags/v3.0.10,refs/tags/v3.0.2,refs/tags/v3.0.3,refs/tags/v3.0.4,refs/tags/v3.0.5,refs/tags/v3.0.6,refs/tags/v3.0.7,refs/tags/v3.0.8,refs/tags/v3.0.9,refs/tags/v3.1.0,refs/tags/v3.1.1,refs/tags/v3.1.10,refs/tags/v3.1.11,refs/tags/v3.1.12,refs/tags/v3.1.13,refs/tags/v3.1.2,refs/tags/v3.1.3,refs/tags/v3.1.4,refs/tags/v3.1.5,refs/tags/v3.1.6,refs/tags/v3.1.7,refs/tags/v3.1.8,refs/tags/v3.1.9,refs/tags/v4.0.0,refs/tags/v4.0.1,refs/tags/v4.0.2,refs/tags/v4.0.3,refs/tags/v4.0.5,refs/tags/v4.0.6,refs/tags/v4.0.8,refs/tags/v4.0.9,refs/tags/v4.1.0,refs/tags/v4.1.1,refs/tags/v4.2.0,refs/tags/v5.0.0,refs/tags/v5.0.1,refs/tags/v5.0.2,refs/tags/v5.0.3,refs/tags/v5.0.4,refs/tags/v5.0.5" for "https://github.com/mapbox/node-sqlite3".
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    The command '/bin/sh -c yarn install' returned a non-zero code: 1
    ERROR: Service 'server' failed to build : Build failed
    

    To Reproduce Steps to reproduce the behavior:

    1. git clone this repo
    2. cd Drift
    3. edit docker-compose.yml
    4. docker-compose up

    Expected behavior yarn install success

    Desktop (please complete the following information):

    • OS: Ubuntu 20.04.4 LTS
    • Browser None
    • Version None
    bug 
    opened by Antisunny 3
  • Destoy files when destroying post

    Destoy files when destroying post

    Fixes #51 though we should consider adding a overarching transaction over the whole deletion 😸.

    The deletion here: https://github.com/MaxLeiter/Drift/blob/6a6a2a34966a4413bd9ffa16c6033b6e660bb851/server/src/routes/posts.ts#L312-L313

    was ok, but files key was never set.

    opened by jazcarate 3
  • refactor: docker

    refactor: docker

    this is the basic refactor of the docker stuffs for drift. there are things that still need to be fleshed out like:

    • [ ] ignoring build errors
    • [ ] properly handling the prisma command
    • [ ] the issue of image size(~2GB) due to bundling node_modules. to slim it down it would need to use the next standalone build tool: https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files

    this needs testing with auth providers as the example is what was in the compose originally. if you run the db on the same host as drift you will need to manually make a docker network for them to communicate as the compose file cant do that for you.

    opened by kinghat 1
  • chore(deps): update node.js to v19

    chore(deps): update node.js to v19

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | node | final | major | 17-alpine -> 19-alpine | | node | stage | major | 17-alpine -> 19-alpine |


    Release Notes

    nodejs/node

    v19

    Moved to doc/changelogs/CHANGELOG_IOJS.md#​1.6.0.

    v18

    Moved to doc/changelogs/CHANGELOG_IOJS.md#​3.1.0.


    Configuration

    📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update dependency @next/bundle-analyzer to v13

    chore(deps): update dependency @next/bundle-analyzer to v13

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @next/bundle-analyzer | 12.1.6 -> 13.0.5 | age | adoption | passing | confidence |


    Release Notes

    vercel/next.js

    v13.0.5

    Compare Source

    Core Changes
    • Remove unnecessary async function when preloading async components: #​42957
    • Add force-static handling for app dir: #​43061
    • Add experimental outputFileTracingIgnores config: #​43103
    • Leverage outputFileTracingIgnores for next-server trace as well: #​43108
    • Remove unstable_revalidate: #​43119
    • types: better type definition for internal utils: #​43070
    • Eagerly build swc binaries on change: #​43142
    • chore: Update swc_core to v0.43.23: #​42977
    • fix(next-swc/relay): make pages directory optional: #​43116
    • Remove the timestamp query for CSS resources: #​43185
    • Update experimental skipTrailingSlashRedirect handling: #​43201
    • Avoid bundling appDir rendering into pages edge SSR bundle: #​43184
    • Alias esm next document to avoid mismatch react context: #​43192
    • Fix middleware not executed when pages directory is empty: #​43205
    • Remove app routes from _devPagesManifest: #​43188
    • Fix HMR error: "Cannot read properties of null (reading 'length')": #​43145
    • fix(ts): re-export PageComponent and LayoutComponent types: #​43226
    • Fix app routes are not correctly matched when src directory is used: #​43234
    • chore: add firebase-admin to default serverComponentsExternalPackages list: #​43249
    • Fix React.cache() in layout/page file: #​43187
    • build(cargo): bump up turbopack: #​43273
    • fix(next-swc): aarch64 build: #​43275
    • Add fallback aliases for React: #​43203
    • fix: apply default export interop to next/error: #​43238
    • Remove unused use-sync-external-store dependency: #​43281
    • Imageloader: collect images serverside to include images from staticp…: #​41554
    • Update precompiled react: #​43288
    • Resolve next api for layouts to esm for edge runtime: #​43302
    • Refactor code: #​43291
    • Show error for invalid page props in the TS plugin: #​43300
    • docs: add error link when missing appDir: true: #​43293
    Documentation Changes
    • Add note in next/link docs about anchor props: #​43064
    • Remove unneeded async in docs.: #​43161
    • Add JWT example to error page.: #​43162
    • Updated typo in the documentation: #​43160
    • Add missing quote in next/script example: #​43196
    • Add a note about the auto-created empty directory: #​43219
    • docs: Add default browserslist configuration as a starting point: #​43260
    Example Changes
    • chore: Updating Tigris example to use stable release: #​43058
    • examples(with-ant-design): bump antd v5.0.0: #​43062
    • fix: Wrong link to source in "responsive" image example: #​43081
    • chore(examples): with-msw update msw: #​43224
    • Fix With Passport example: #​43232
    • chore(examples): update Next.js in with-redux-reducer: #​43237
    • Updates supertokens example app SSR behaviour: #​43218
    • docs: add missing AppProps import: #​43136
    • Convert more jsx/styled-components examples to TypeScript: #​43117
    • Convert with-videojs, with-yoga, with-zones examples to TypeScript: #​43280
    Misc Changes
    Credits

    Huge thanks to @​hanneslund, @​adilansari, @​chunsch, @​bennettdams, @​maxproske, @​SukkaW, @​kdy1, @​orionmiz, @​leerob, @​shuding, @​aziyatali, @​NiedziolkaMichal, @​huozhi, @​colinking, @​juliusmarminge, @​andykenward, @​Yutsuten, @​balazsorban44, @​FomichRoman, @​rishabhpoddar, @​arturbien, @​ADTC, @​JanKaifer, @​ijjk, @​kwonoj, @​joliss, @​Andarist, and @​Laityned for helping!

    v13.0.4

    Compare Source

    Core Changes
    • Show link to the docs for route segment config options: #​42779
    • fix: Fix regression of swc minifier: #​42790
    • Add additional item to RSC payload, preparing for head.tsx on navigation: #​42791
    • Use window.location directly instead of parsing into URL: #​42888
    • feat(next-swc/relay): Add javascript to language: #​42894
    • types(#​42003): better typing for next/link: #​42117
    • Ensure query is provided correctly with middleware rewrites: #​42818
    • feat(next/swc): allow to run custom turbopack binary: #​42656
    • fix: Error: NEXT_REDIRECT crashing server in prod: #​42793
    • Update caching for swc turbo builds: #​42929
    • Handle head.js on client-side navigation: #​42904
    • feat(jest): respect transpilePackages in tests: #​42987
    • App files ending with page registred as page files: #​42996
    • Allow generateStaticParams to be a synchronous function in app directory: #​42942
    • chore(eslint-config-next): bump eslint-import-resolver-typescript: #​43010
    • Ensure next.config.js function is handled for turbo: #​43015
    • Fix app page check on windows: #​43022
    • Add middleware prefetching config: #​42936
    • Fix middleware prefetch cases: #​43056
    • Ensure backslash is correctly handled in find-page-file: #​43057
    • Fix app render: escape segment value #​42626: #​42823
    Documentation Changes
    • docs: fix middleware docs cookie example: #​42816
    • Update docs/advanced-features/debugging.md: #​42842
    • docs(edge-api-routes): fixes example: #​42903
    • Update SFCC example to use TypeScript + @next/font: #​42865
    • Add more details to invalid-next-config doc: #​42917
    • typo: #​42968
    • Document regions config for experimental-edge: #​43009
    • docs: Add examples of using multiple weights and styles: #​43031
    Example Changes
    • chore(examples): next/future/image -> next/image: #​42794
    • docs(examples): auth0 update callback URL: #​42855
    • Updates Apollo Server Examples to use Apollo Server 4 & @​as-integrations/next: #​42771
    • Improve with-algolia-react-instantsearch example and convert to TypeScript: #​42617
    • Convert blog cover images to next/image: #​42908
    • Make cover image full width: #​42916
    • Convert with-app-layout example to TypeScript: #​42930
    • Tigris example with Next.js: #​42662
    • feat(examples): with-grafbase: #​42898
    • docs(examples): add postgres.js example: #​42962
    • Remove with-atlaskit example: #​42973
    • Remove with-carbon-components example: #​42976
    • Remove with-cerebral example: #​42980
    • Remove swcMinify option from example configs: #​43012
    • Convert with-cssed, with-csx, with-styled-jsx examples to TypeScript: #​43018
    • feat(examples): use experimental edge runtime with grafbase: #​42992
    Misc Changes
    • Update bundle analyzer dependency and output: #​42797
    • Update to latest version of turbo CLI: #​42803
    • Fix cache collision for swc darwin: #​42960
    • Fix build-wasm-dev docs skip: #​42961
    • Update deployment used for e2e test: #​42969
    • test(integration): update test fixture: #​42966
    • Fix test retry cleanup: #​43011
    • Update test wasm timeout: #​43014
    • @​next/font/google variable fonts without weight range: #​43036
    • Update build-wasm to checkout directly: #​43054
    Credits

    Huge thanks to @​shuding, @​balazsorban44, @​kdy1, @​huozhi, @​reyrodrigez, @​andykenward, @​idoob, @​maxproske, @​KoltonG, @​timneutkens, @​feugy, @​leerob, @​steven-tey, @​SukkaW, @​kwonoj, @​adilansari, @​hanneslund, @​notrab, @​zekicaneksi, @​silvioprog, @​joulev, @​chanceaclark, and @​Marcus-Rise for helping!

    v13.0.3

    Compare Source

    Core Changes
    • bump @​typescript-eslint/parser version to support TS 4.8: #​42439
    • chore: Update swc_core to v0.40.40: #​42326
    • Add telemetry for turbotrace: #​42486
    • Fix undici warning in Node.js 18: #​42477
    • Ensure RSC is detecting correctly during revalidate: #​42508
    • fix: correctly mention generateStaticParams in error: #​42524
    • Re-enable sandbox cache and update AsyncLocalStorage usage: #​42547
    • Check properly whether SWC is used or not when using forceSwcTransforms: #​42531
    • Show inlined error if the "use client" directive is not before other statements/expressions: #​42507
    • Refactor error codes in the TS plugin: #​42585
    • Fix server html insertion target: #​42591
    • next/compat/router: #​42502
    • Fix scrolling on router.refresh: #​42583
    • Fix relative TypeScript path in monorepos: #​42586
    • Aggregate updates using addStatusHandler and Promise.resolve instead of setTimeout: #​42350
    • fix(next/dev): bubble up unhandled exception from --turbo: #​42594
    • Rename RSC and Router headers: #​42482
    • Ensure build trace ignores apply correctly when nested: #​42606
    • Include @​prisma/client in default external packages: #​42624
    • Replace global with globalThis: #​42627
    • Colocate styles with special entries: #​42506
    • Add lazy initialize of router cache nodes: #​42629
    • Add telemetry for @​next/font: #​42579
    • Also create head when creating root layout: #​42571
    • feat: add --no-mangling to next build + fix --profile option: #​42633
    • update react builtin deps for next channel: #​42639
    • Ensure skip normalize is handled correctly: #​42642
    • @​next/font/google fetch error dev: #​42637
    • Add missing matcher support: #​42660
    • Remove useless async declaration and replace regexp to plain string in AMP postProcessor: #​42495
    • @​next/font error messages: #​42689
    • Adopt script rejection pattern for link onerror.: #​42645
    • Fix @​next/font imports from outside of the root directory: #​42678
    • Ensure appDir is included in webpack configVars: #​42710
    • Fix replaceAll usage in post-process: #​42714
    • Use import to load page and layout: #​42325
    • Alias next public api to esm on edge runtime: #​42709
    • fix: publish compat folder: #​42613
    • Change condition to check for string attribute in lint rules utility function: #​42625
    • Fix as option with optional catch all routes url object syntax: #​42355
    • fix comma splice in verifyRootLayout.ts: #​42324
    • build(next-swc): update turbopack to latest: #​42733
    • @​next/font return types: #​42753
    • Eagerly bundle external ESM dependencies for pages: #​42741
    • Handle hydration replaceState for static page with searchParams: #​42744
    • Add test case for image generation: #​42693
    • Don't pushState when already on the url: #​42735
    • fix: enable emotion import map: #​42750
    • Fix resolving for esm package with only exports.import condition: #​42767
    • Track page counts during builds: #​42766
    Documentation Changes
    • Fix Static Generation link on Pages page: #​42462
    • Docs: Fix invalid tsconfig importSource syntax: #​42465
    • Update response-helpers.md: #​42378
    • react-version.md: Update minimum React version for Next.js 13: #​42490
    • Included negative matcher docs in upgrade guide: #​42489
    • Edit Upgrade docs to correct new-link codemod: #​42501
    • Update turbopack docs to use create-next-app@latest: #​42528
    • Remove all custom server integration examples: #​42549
    • [docs] Document middleware response changes: #​42295
    • Convert with-absolute-imports example to TypeScript: #​42529
    • docs/next/link: Mention middleware + dynamic routes changes: #​42607
    • fix typo in api-reference next/sever: #​42669
    • font api updates: #​42724
    Example Changes
    • Include app directory in Tailwind config: #​42407
    • Removed duplicate MONGODB_URI check in example: #​42518
    • Convert middleware-matcher example to TypeScript: #​42520
    • Convert custom-server-express example to TypeScript: #​42110
    • Example: fixed tailwind ver in readme: #​42551
    • (with-supertokens example): Fixes infinite redirect issue for unauthorised error during SSR: #​42634
    • chore: update scripts to work on windows: #​42632
    • example fix url: #​42695
    Misc Changes
    • Reuse file when shared by several google font variants: #​42480
    • Fix replaceAll usage in font loader: #​42550
    • Fix default value handling for CNA in CI: #​42596
    • chore: encourage adding reproductions to issues: #​42667
    • Fix CSS handling rules: #​42615
    • Update to latest version of turbo CLI: #​42711
    Credits

    Huge thanks to @​lucasassisrosa, @​kdy1, @​ijjk, @​jakemstar, @​lachlanjc, @​ws-jm, @​davidnx, @​steven-tey, @​Brooooooklyn, @​hanneslund, @​josephcsoti, @​fantaasm, @​timneutkens, @​sivtu, @​leerob, @​balazsorban44, @​maxproske, @​rightones, @​bot08, @​shuding, @​huozhi, @​wyattjoh, @​ethomson, @​alexkirsz, @​kwonoj, @​MaxLeiter, @​rishabhpoddar, @​feedthejim, @​gnoff, @​moetazaneta, @​superbahbi, @​NOCELL, @​ademilter, @​nathanhammond, @​imranbarbhuiya, @​mrkldshv, @​cvolant, @​hughlilly, @​ismaelrumzan, and @​sQVe for helping!

    v13.0.2

    Compare Source

    Core Changes
    • Hybrid App Hooks Support: #​41767
    • Add sqlite3 to the default list of server externals: #​42294
    • Improve the error message when custom export fields are used in an entry: #​42221
    • Add preload for layouts / components: #​41519
    • Add mongodb to default server externals: #​42313
    • refactor(next/turbo): consolidate turbo devserver logic: #​42315
    • [middleware] add tests for body reading methods #​37980: #​41718
    • Handle dynamic css-in-js styles under suspense: #​42293
    • Fix page folder being wrongly resolved as page file: #​42348
    • Update dev process exit handling: #​42367
    • Ensure edge runtime doesn't propagate cache on fetch as Cloudflare doesn't support it.: #​42362
    • Add prisma to the external package list: #​42323
    • Local font family name: #​42286
    • useSelectedLayoutSegment at the current level: #​42299
    • Stop writing window specific paths in vscode configuration: #​42338
    • Ensure Undici is enabled for appDir in all cases: #​42382
    • fix: usage of wasm in an appDir page file using the edge runtime: #​41689
    • feat(next/mdx): support experimental mdx-rs loader: #​41919
    • Fix CSS modules imports not collected due to race conditions: #​42392
    • Fix entry creation on Windows: #​42421
    • Mock @​next/font when using next/jest: #​42413
    • Avoid breaking useRouter() type change: #​42430
    • Do not strip loader arg in dynamic for server components: #​42426
    • Clarify app and pages file conflicting files: #​42415
    • Change usePathname to return string | null: #​42380
    • Fix undici warning showing unexpectedly: #​42444
    • Remove static generation bail-out from usePathname: #​42440
    Documentation Changes
    • docs(script): explain expected next/script behavior on client-side navigation: #​42260
    • Add path for information in cookie setting: #​42146
    • Update wording to remove beta FUD and keep evergreen: #​42337
    • update font optimization page: #​42266
    • Fix broken link on the upgrading guide: #​42340
    • Fix typo: docs/api-reference/next/font.md: #​42344
    • Update getting-started.md: #​42353
    • Fix typo in usage of onError in script.md: #​42368
    • Fix negative lookahead example in middleware.md: #​42320
    • Update customizing-postcss-config.md: #​42331
    • update middleware cookies example: #​42341
    • Fix Docs API Reference font.md broken link: #​42418
    • fixed missing <Link /> keyword: #​42422
    • Fix docs for next/image upgrade guide: #​42424
    • Revert font-optimization.md syntax: #​42403
    • Fix invalid markdown lang: #​42442
    Misc Changes
    • Update app-dir E2E tests for deploy: #​42269
    • create-next-app: add head to template: #​42357
    • Update flakey SIGINT test: #​42370
    • Fix typo in app / hello.js template: #​42335
    • [eslint-plugin] Stop warning for head element in app/layout on Windows: #​42336
    • Update default eslint choice for CNA setup: #​42371
    • Update swc builds: #​42393
    • Add meta tag to default app template: #​42394
    • examples: Fix with-turbopack typo: #​42410
    • Google fonts single request: #​42406
    Credits

    Huge thanks to @​wyattjoh, @​shuding, @​ijjk, @​timneutkens, @​kwonoj, @​balazsorban44, @​Kikobeats, @​BLUE-DEVIL1134, @​timeyoutakeit, @​huozhi, @​ismaelrumzan, @​mnajdova, @​aleksa-codes, @​delbaoliveira, @​gruz0, @​meenie, @​danmindru, @​inokawa, @​hanneslund, @​oBusk, @​BRKalow, @​devvspaces, @​lucasassisrosa, @​adictonator, @​m7yue, @​styfle, and @​chibicode for helping!

    v13.0.1

    Compare Source

    Core Changes
    • Rest of options in experimental.turbotrace and documentation: #​41817
    • Fix revalidate check in client component: #​41917
    • Add data attribute to div to distinguish it: #​41889
    • Fix lint cli help: #​41783
    • [Doc] Update inline documentation for next/link: #​41871
    • feat(edge): split NextCookies to RequestCookies and ResponseCookies: #​41526
    • Show error message when using legacy props on new next/image: #​41930
    • Upgrade Edge Runtime: #​41987
    • Revert "Include frameworks in main-app": #​41997
    • fix(next/dev): do not suppress error from bindings: #​41989
    • Fix page static info extractor for app dir: #​42001
    • Add never return type for redirect() and notFound(): #​42009
    • Google fonts multiple weights & styles: #​42008
    • Merge app internal chunk into main chunk for layouts: #​41902
    • Fix build type error of page params: #​42019
    • Allow disabling Strict mode in app: #​41894
    • Update react next channel: #​42021
    • Fix turbo custom config detection: #​42022
    • Fix css modules imports in client components: #​42077
    • fix: Data URL images with 'fill' are always triggering 'missing sizes' warning: #​42030
    • types: leverage webpack types and remove casting: #​42104
    • Fix CSS imports from outside of the app dir when src folder is present: #​42108
    • Remove react root condition and always use concurrent mode: #​42141
    • Keep react-dom/server.node in precompiled: #​42138
    • Warn when legacy prop detected on next/image: #​42102
    • Fix failing codemod test url-to-withrouter: #​42109
    • Improve TypeScript plugin error when the configuration is not statically analyzable: #​42062
    • Ensure app revalidate has correct default: #​42168
    • Update turbo crates: #​42014
    • Update vscode config handling: #​42169
    • fix: allow resolving large JSON data in server components: #​42025
    • issue-41925 fix: skip duplicate props when transferring props from anchor to link: #​42158
    • Ensure we detect config correctly with turbo flag: #​42201
    • update turbo version: #​42228
    • Fix CSS modules imports from outside of the root directory: #​42106
    • Default font config fix: #​42235
    • Multiple local font weights and styles: #​42232
    • Optimize bundle size for appDir: #​42252
    • Add event for dev process stop: #​42255
    • Add E2E test for @​vercel/og API route: #​42258
    Documentation Changes
    Example Changes
    • Add turbopack example: #​41789
    • examples: Update turbopack: #​41793
    • examples: Remove turbo.json from turbopack example: #​41794
    • example: add postcss as with-turbopack example devDep: #​41795
    • Update with-supertokens example: #​41802
    • chore: remove swcMinify: true as it's the new default.: #​41877
    • Update link in Turbopack example.: #​41876
    • fix any type in example with-turbopack: #​41798
    • Update with-aws-amplify with TypeScript: #​41815
    • Convert many examples to TypeScript: #​41825
    • Fixed errors at with-passport-and-next-connect.: #​41897
    • chore(examples): use next@latest in all examples: #​41922
    • chore: update example dev script: #​41904
    • Update README.md: #​41959
    • Fix benchmark link typo in Turbopack example: #​42064
    • Update Examples to use React 18: #​42027
    • chore(examples): fix with-aphrodite exapmle: #​42078
    • chore(examples): move app directories: #​42094
    • Broken link in example page: #​42135
    • Fix typo in importing counterReducer: #​42162
    • Run next/link codemod for Next.js 13 on examples: #​41913
    • Fix next/link codemod errors in with-turbopack: #​42203
    Misc Changes
    • Update Cargo.lock file
    • fix example command in issue template for create-next-app : #​41803
    • Remove swcMinify: true since this is 13's default: #​41869
    • test(dev): support to run test with --turbo: #​41908
    • docs: clarify PR template instructions: #​41957
    • Update e2e test for app-dir edge: #​42015
    • [docs] Fix Grammar in Step 8.: #​42018
    • Fix turbo css-modules test: #​42103
    • Enhanced grammar.: #​42148
    • grammar fix in adding-examples README.: #​42152
    • [docs] Enhanced grammar in building README.: #​42155
    • Fix typo pnpm-lock.yam in .prettierignore_staged: #​42212
    • docs(create-next-app): copy JJ's changes from #​42012 to package-level README: #​42217
    • Update failing e2e middleware response test: #​42256
    Credits

    Huge thanks to @​jaredpalmer, @​ijjk, @​Brooooooklyn, @​koenpunt, @​rishabhpoddar, @​karlhorky, @​balazsorban44, @​leerob, @​NekoChanTaiwan, @​chrisipanaque, @​Reshmi-Sriram, @​maxproske, @​Kosai106, @​timneutkens, @​kwonoj, @​hanneslund, @​bertho-zero, @​abayomi185, @​styfle, @​Kikobeats, @​nuta, @​yasath, @​shuding, @​serkanbektas, @​steven-tey, @​jimCresswell, @​alpha-xek, @​huozhi, @​LorenzoBloedow, @​iiegor, @​craigwheeler, @​peraltafederico, @​teobler, @​ismaelrumzan, @​IngoVals, @​jaykch, @​artdevgame, @​ishaqibrahimbot, @​ctjlewis, @​wxh06, @​sokra, @​timeyoutakeit, and @​DuncanOgle for helping!

    v13.0.0

    Compare Source

    Core Changes
    • Use resolved url in flight entry loader: #​40697
    • Handle redirects in new router: #​40396
    • Combine redirect function in new router: #​40717
    • fix: InferGetServerSidePropsType and InferGetStaticPropsType: #​40635
    • Update to leverage AsyncLocalStorage for app static handling: #​40727
    • Change flight querystring to header: #​40752
    • Improved bundling strategy for the server graph: #​40739
    • Remove unnecessary experimental flag: #​40766
    • next-swc: add next-font-loaders to crates/core: #​40221
    • Add next font package: #​40227
    • Strip internal pages for pagesDir in app edge ssr: #​40776
    • Add support for font loaders: #​40746
    • Set __NEXT_NEW_LINK_BEHAVIOR in Jest tests when newNextLinkBehavior is true: #​40702
    • Add handling for 404 in new router: #​40787
    • Fix alias paths for bundling: #​40800
    • Fix required server files for font loader manifest: #​40784
    • Add local font loader: #​40801
    • Update error handling during app static generation: #​40823
    • Handle redirect in same way as 404 in new router: #​40796
    • build: upgrade edge-runtime: #​40788
    • Allow export const in font loader: #​40836
    • chore: Update swc: #​40832
    • Update app-router options type: #​40862
    • Flight client navigation error: #​40861
    • Use startTransition for hydrateRoot to opt-in to non-blocking hydration: #​40874
    • Add optoutServerComponentsBundle option: #​40770
    • Apply #​40833: #​40872
    • Upgrade react@experimental: #​40885
    • Update handling of redirect/404 throw to cross server->client boundary: #​40890
    • Update pre-compiled: #​40914
    • Update font loader output path: #​40868
    • Disable head element lint rule for appDir: #​40921
    • Should resolve esm external module imports on server: #​40865
    • edge-ssr: bundle next/dist as ESM for better tree-shaking: #​40251
    • Improve types for <Image /> and responseLimit: #​40863
    • chore: Update swc: #​40928
    • Ensure skipClientCache is honored for router.push: #​40932
    • Fix bundling and module resolution in the server layer: #​40818
    • Handle loading returning undefined: #​40938
    • Fix SWC loader ignore for the server layer when Babel is used: #​40939
    • Code refactoring for webpack-config: #​40942
    • Merge e2e test node_modules: #​40926
    • Rename 404 -> not-found for new router: #​40941
    • remove reducer from server bundle: #​40959
    • [edge] serialize custom config to middleware-manifest: #​40881
    • Font loader support in app: #​40898
    • docs: add inline documentation for Link props: #​40855
    • feat(experimental): option to polyfill fetch using undici in Node.js <18: #​40318
    • Update return shape of generateStaticParams: #​40965
    • remove legacy transform code: #​40966
    • Revert "edge-ssr: bundle next/dist as ESM for better tree-shaking (#​40251): #​40967
    • Update to use HEAD request for middleware query hydration: #​40973
    • Revert "Merge e2e test node_modules (#​40926)": #​40974
    • edge-ssr: bundle next/dist as ESM for better tree-shaking (#​40251): #​40980
    • Rename flight parameters to rsc/next: #​40979
    • Remove outdated warning: #​40988
    • misc: add MANGLING_DEBUG option: #​40958
    • Fix wrong code condition used when bundling the server: #​40987
    • Move pagesDir handling out of wrappedRender: #​40995
    • Fix unused CSS module imports are tracked on the server: #​40996
    • Skip creating virtual app client entry for pages: #​41000
    • chore: remove unsless @​ts-ignore: #​40992
    • Add support for fallback font and css variable for font/local: #​40990
    • Use throw to trigger Suspense to avoid use() in reducer warning: #​40950
    • chore: Update swc: #​40983
    • Revert "chore: Update swc": #​41015
    • Docs for experimental font optimization adjustFontFallbacks: #​40771
    • Drop legacy React DOM Server in Edge runtime: #​40018
    • misc: make useReducerWithDevtools noop on server: #​41019
    • Remove reload on serverComponentChanges in pages: #​41020
    • chore: Update swc_core to v0.28.10: #​41016
    • Alias all client, shared, pages dist assets for esm: #​41034
    • Add Replay integration for dev e2e tests: #​40955
    • Add with-xata example: #​39864
    • Make sure polyfills ar

    Configuration

    📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Refactor to app/ directory

    Refactor to app/ directory

    There's a few goals here, generally listed in order of priority below. Any help is welcome! There's tons to do.

    1. Migrate to Next.js 13's app directory (https://beta.nextjs.org/docs)
    2. Migrate to Prisma as the ORM
    3. Remove the express server and replace with next API routes
    4. In app/, don't use /api calls but directly reference the prisma db when possible (in server components)
    5. Refactor API calls to not wait when unnecessary

    This unblocks #126 Closes #124, closes #125, closes #79 Invalidates #66 Hopefully addresses #55

    opened by MaxLeiter 1
  • build(deps): bump ejs from 3.1.6 to 3.1.8 in /server

    build(deps): bump ejs from 3.1.6 to 3.1.8 in /server

    Bumps ejs from 3.1.6 to 3.1.8.

    Release notes

    Sourced from ejs's releases.

    v3.1.8

    Version 3.1.8

    v3.1.7

    Version 3.1.7

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
Owner
Max Leiter
@KnightOS and @thelounge are cool
Max Leiter
self bot wa using baileys recode by wabot-aq

self bot wa using baileys recode by wabot-aq

FaridMhrdkaa 14 Dec 19, 2022
It's open source alternative to services like: integrately, ifttt, zapier, n8n

ozyifttt It's open source alternative to services like: integrately, ifttt, zapier, n8n Currently, it's support: telegram, github, jira You can add to

null 6 Oct 28, 2022
Garçon is a slack bot designed for recommending restaurants and order lunches for you from buy.am delivery service.

Garçon What is it about ? Garçon is a slack bot designed for recommending restaurants and order lunches for you from buy.am delivery service.

Paruyr Muradian 4 Jul 23, 2022
The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.

List.js Perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on

Jonny Strömberg 10.9k Jan 1, 2023
Drag and drop library for two-dimensional, resizable and responsive lists

GridList Drag and drop library for a two-dimensional resizable and responsive list of items Demo: http://hootsuite.github.io/grid/ The GridList librar

Hootsuite 3.6k Dec 14, 2022
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

JavaScript Algorithms and Data Structures This repository contains JavaScript based examples of many popular algorithms and data structures. Each algo

Oleksii Trekhleb 158k Dec 31, 2022
Gmail-like client-side drafts and bit more. Plugin developed to save html forms data to LocalStorage to restore them after browser crashes, tabs closings and other disasters.

Sisyphus Plugin developed to save html forms data to LocalStorage to restore them after browser crashes, tabs closings and other disasters. Descriptio

Alexander Kaupanin 2k Dec 8, 2022
A lightweight jQuery plugin for collapsing and expanding long blocks of text with "Read more" and "Close" links.

Readmore.js V3 alpha I am deprecating the 2.x version of Readmore.js. A new version is coming soon! Check it out and help me test it! Readmore.js A sm

Jed Foster 1.5k Nov 30, 2022
FriendAdvisor is a mobile app with a focus on allowing friends and family to coordinate and receive text notifications about upcoming group events.

FriendAdvisor is a mobile app with a focus on allowing friends and family to coordinate and receive text notifications about upcoming group events.

Brad Johnson 4 Sep 29, 2022
Defines the communication layer between mobile native(iOS/Android) and webview using JSON Schema and automatically generates SDK code

Defines the communication layer between mobile native(iOS/Android) and webview using JSON Schema and automatically generates SDK code.

당근마켓 31 Dec 8, 2022
A responsive image polyfill for , srcset, sizes, and more

Picturefill A responsive image polyfill. Authors: See Authors.txt License: MIT Picturefill has three versions: Version 1 mimics the Picture element pa

Scott Jehl 10k Dec 31, 2022
A high-performance, dependency-free library for animated filtering, sorting, insertion, removal and more

MixItUp 3 MixItUp is a high-performance, dependency-free library for animated DOM manipulation, giving you the power to filter, sort, add and remove D

Patrick Kunka 4.5k Dec 24, 2022
JavaScript Survey and Form Library

SurveyJS is a JavaScript Survey and Form Library. SurveyJS is a modern way to add surveys and forms to your website. It has versions for Angular, jQue

SurveyJS 3.5k Jan 1, 2023
Extensive math expression evaluator library for JavaScript and Node.js

?? Homepage Fcaljs is an extensive math expression evaluator library for JavaScript and Node.js. Using fcal, you can perform basic arithmetic, percent

Santhosh Kumar 93 Dec 19, 2022
Components for interactive scientific writing, reactive documents and explorable explanations.

@curvenote/article The goal of @curvenote/article is to provide web-components for interactive scientific writing, reactive documents and explorable e

curvenote 142 Dec 24, 2022
Create explorable explanations and interactive essays.

Tutorials | Examples | Docs | Chatroom | Mailing list | Twitter What is Idyll? For an introduction to Idyll, API reference, examples, and tutorials, p

Idyll 1.9k Dec 27, 2022
Browser fingerprinting library with the highest accuracy and stability.

FingerprintJS is a browser fingerprinting library that queries browser attributes and computes a hashed visitor identifier from them. Unlike cookies a

FingerprintJS 18.1k Dec 31, 2022
autoNumeric is a standalone library that provides live as-you-type formatting for international numbers and currencies.

What is autoNumeric? autoNumeric is a standalone Javascript library that provides live as-you-type formatting for international numbers and currencies

AutoNumeric 1.7k Dec 16, 2022
Bookmarklet to remove sticky elements and restore scrolling to web pages!

Bookmarklet to remove sticky elements and restore scrolling to web pages!

Tim Martin 648 Dec 29, 2022