README.md (3180B)
1 damus.io 2 ========= 3 4 The damus.io website 5 6 ## Installation 7 8 1. Install [nodejs](https://nodejs.org/en/download/) (v18.0.0 or higher is required) 9 2. Install dependencies with `npm install` (`yarn install` or `pnpm install` are possibilities if preferred) 10 11 ## Running the development server (for local development) 12 13 First, run the development server from the root directory of the project: 14 15 ```bash 16 npm run dev 17 ``` 18 19 Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 20 21 You can start editing the page by modifying any page or component. The page auto-updates as you edit the file. 22 23 ## Building for production 24 25 To build the project for production, run the following command from the root directory of the project: 26 27 ```bash 28 npm run build 29 ``` 30 31 This will build the project for production and output the result to the `.next` directory. 32 33 ## Deploying to production 34 35 This project can be deployed to any static hosting provider that supports Next.js. Examples include [Vercel](https://vercel.com), [Netlify](https://netlify.com). 36 37 ## Project structure 38 39 The project is roughly structured as follows: 40 41 - `package.json` - The [npm](https://npmjs.com/) configuration file (contains dependencies, scripts, etc.) 42 - `src/components/` - React components used throughout the project 43 - `src/pages/` - The pages of the website 44 - `public/` - Static assets such as images, fonts, etc. Any files in this directory will be served under the `/` path. 45 - `tailwind.config.js` - The [Tailwind CSS](https://tailwindcss.com/) configuration file. This file is used to configure the Tailwind CSS framework, which is used for styling the website. 46 - `next.config.js` - The [Next.js](https://nextjs.org/) configuration file, which is used to configure the Next.js framework. 47 - `tsconfig.json` - The [TypeScript](https://www.typescriptlang.org/) configuration file, which is used to configure the TypeScript compiler. 48 - `postcss.config.js` - The [PostCSS](https://postcss.org/) configuration file, which is used to configure the PostCSS compiler. PostCSS is used to compile Tailwind CSS to regular CSS. 49 - `src/pages/api` - The [Next.js API routes](https://nextjs.org/docs/api-routes/introduction), which can used to implement server-side (serverless) functions. 50 51 ## Operations 52 53 ### Putting Purple checkout under maintenance mode 54 55 To put the Purple checkout under maintenance mode, simply make a route called `/purple-checkout-maintenance` available (returns HTTP 200). 56 57 In a static build, this can be done by creating a file called `purple-checkout-maintenance` at the root of wherever the static files are being hosted: 58 59 ```bash 60 touch /path/to/static/files/purple-checkout-maintenance 61 ``` 62 63 When present, the checkout page will be replaced with a maintenance message. 64 65 ## Contributing 66 67 You can send me patches over nostr or [email][email] at jb55@jb55.com 68 69 You can also just hit me up with a git-request-pull and ask me to pull one of 70 your branches. eg, from github: 71 72 git request-pull origin/master https://github.com/bob/my-damus-io-fork 73 74 If you email or nostr me the output of this command I will be able to review & 75 merge your changes! 76 77 [email]: https://git-send-email.io/