Overview:
DriftNote is a self-hostable Gist clone that is currently being refactored to Next.js 13 app directory and React Server Components. It is in beta but fully functional, allowing users to host their own instances. Drift is built with Next.js 13, React Server Components, shadcn/ui, and Prisma.
Features:
- Self-hostable Gist clone: Users can host their own instances of Drift on their servers.
- Built with Next.js 13 and React Server Components: Utilizes modern technologies for efficient performance.
- Functionality: Fully functional beta version with the ability to create, share, and manage Gists.
- Environment Variables: Customizable environment variables for configuration.
- Support for pm2 and Docker: Easy deployment options with pm2 and Docker.
- Authentication Options: Supports GitHub OAuth and credential authentication.
Installation:
Setup:
- In the root directory, run
pnpm i
to install dependencies. - For file watching and live reloading during development, run
pnpm dev
in the client directory. - To interact with the database using Prisma, use
pnpm prisma
orpnpm exec prisma
.
Production:
- Run
pnpm build
to build production code. - Start the Next.js server with
pnpm start
.
Environment Variables:
DRIFT_URL
: URL of the Drift instance.DATABASE_URL
: URL to connect to the PostgreSQL database.WELCOME_CONTENT
: Markdown string displayed on the homepage.ENABLE_ADMIN
: First account created is an administrator account.REGISTRATION_PASSWORD
: Password required for account registration.NODE_ENV
: Defaults to development or production.
Auth Environment Variables:
GITHUB_CLIENT_ID
: Client ID for GitHub OAuth.GITHUB_CLIENT_SECRET
: Client secret for GitHub OAuth.NEXTAUTH_URL
: URL of the Drift instance.CREDENTIAL_AUTH
: Whether to allow username/password authentication.
For detailed setup using pm2, Docker, or running with systemd, refer to the original documentation.
Summary:
DriftNote is a self-hostable Gist clone refactored with Next.js 13 and React Server Components. It offers key features such as self-hosting options, modern technology stack, functionality, customizable environment variables, and support for deployment using pm2 or Docker. Users can easily set up Drift with detailed installation instructions and configuration options.