├── .env.example ├── .gitignore ├── .npmrc ├── LICENSE ├── README.md ├── app ├── app.config.ts ├── app.vue ├── components │ └── OgImage │ │ └── OgImagePage.vue └── pages │ └── [[slug]].vue ├── eslint.config.mjs ├── nuxt.config.ts ├── package.json ├── pnpm-lock.yaml ├── public └── favicon.ico ├── server ├── api │ ├── login.post.ts │ ├── pages.ts │ └── pages │ │ ├── [slug].get.ts │ │ └── [slug].put.ts └── routes │ └── assets │ └── [...pathname].get.ts └── tsconfig.json /.env.example: -------------------------------------------------------------------------------- 1 | ADMIN_PASSWORD=your-admin-password 2 | NUXT_SESSION_PASSWORD=password-for-sealed-session-of-32-chars-min 3 | # Nuxt UI Pro License, available on https://ui.nuxt.com/pro 4 | NUXT_UI_PRO_LICENSE= -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log* 3 | .nuxt 4 | .nitro 5 | .cache 6 | .output 7 | .env 8 | dist 9 | .data 10 | data 11 | .wrangler 12 | wrangler.toml 13 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | strict-peer-dependencies=false 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sébastien Chopin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Save your Markdown notes online with Atinotes 🖌️ 2 | 3 | Read more on https://notes.atinux.com 4 | 5 | [![Nuxt UI Pro](https://img.shields.io/badge/Made%20with-Nuxt%20UI%20Pro-00DC82?logo=nuxt.js&labelColor=020420)](https://ui.nuxt.com/pro) 6 | 7 | [![Deploy to NuxtHub](https://hub.nuxt.com/button.svg)](https://admin.hub.nuxt.com/new?template=atinotes) 8 | 9 | ## Setup 10 | 11 | Make sure to install the dependencies: 12 | 13 | ```bash 14 | # pnpm 15 | pnpm install 16 | ``` 17 | 18 | ## Development Server 19 | 20 | Start the development server on http://localhost:3000 21 | 22 | ```bash 23 | pnpm run dev 24 | ``` 25 | 26 | Copy the `.env.example` to `.env` and update the variables to your own. 27 | 28 | ## Production 29 | 30 | Note that you need a [Nuxt UI Pro license](https://ui.nuxt.com/pro) to build the application for production. 31 | 32 | Build the application for production: 33 | 34 | ```bash 35 | pnpm run build 36 | ``` 37 | 38 | Locally preview production build: 39 | 40 | ```bash 41 | pnpm run preview 42 | ``` 43 | 44 | Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. 45 | 46 | ## Deploy 47 | 48 | ### With NuxtHub 49 | 50 | You can deploy this template directy on your CloudFlare account with zero configuration with the [NuxtHub Console](https://console.hub.nuxt.com) and get a free `.nuxt.dev` domain. 51 | 52 | ```bash 53 | pnpx nuxthub deploy 54 | ``` 55 | 56 | Once deployed, you can manage your project by running: 57 | 58 | ```bash 59 | pnpx nuxthub manage 60 | ``` 61 | 62 | Then add the following environement variables: 63 | 64 | ``` 65 | ADMIN_PASSWORD= 66 | NUXT_SESSION_PASSWORD= 67 | NUXT_UI_PRO_LICENSE= 68 | ``` 69 | 70 | Once saved, the deployment will be updated with the new environment variables. 71 | 72 | ### Manually on Cloudflare Pages 73 | 74 | Once you created your GitHub repository with this template, you can connect to it, then add those env variables: 75 | 76 | ``` 77 | ADMIN_PASSWORD= 78 | NUXT_SESSION_PASSWORD= 79 | NUXT_UI_PRO_LICENSE= 80 | ``` 81 | 82 | Then, setup the build command on CloudFlare Pages to be: 83 | 84 | ```bash 85 | nuxt build 86 | ``` 87 | 88 | The output directory is: `dist/` 89 | 90 | Next, you need to link a KV namespace to the deployment, the binding should be named `KV`. 91 | 92 | ![KV example on CloudFlare](https://github.com/Atinux/atinotes/assets/904724/3c35a422-b646-41b9-9337-cc7de06f0d14) 93 | 94 | That's all :sparkles: 95 | 96 | ## License 97 | 98 | [MIT](./LICENSE) - Sébastien Chopin 99 | -------------------------------------------------------------------------------- /app/app.config.ts: -------------------------------------------------------------------------------- 1 | export default defineAppConfig({ 2 | ui: { 3 | primary: 'lime', 4 | gray: 'neutral' 5 | } 6 | }) 7 | -------------------------------------------------------------------------------- /app/app.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 100 | -------------------------------------------------------------------------------- /app/components/OgImage/OgImagePage.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 34 | -------------------------------------------------------------------------------- /app/pages/[[slug]].vue: -------------------------------------------------------------------------------- 1 | 52 | 53 |