├── .eslintrc.json
├── bun.lockb
├── app
├── favicon.ico
├── opengraph-image.png
├── page.tsx
├── sitemap.ts
├── api
│ └── webhook
│ │ └── route.ts
├── t
│ └── [id]
│ │ ├── page.tsx
│ │ └── opengraph-image.tsx
└── layout.tsx
├── public
├── logo.png
├── vercel.svg
└── next.svg
├── styles
├── globals.css
└── ClashDisplay-Semibold.otf
├── postcss.config.js
├── prettier.config.js
├── components
├── icons
│ ├── index.tsx
│ ├── twitter.tsx
│ ├── github.tsx
│ ├── loading-circle.tsx
│ └── buymeacoffee.tsx
├── generated-count.tsx
├── popover.tsx
├── form-rsc.tsx
├── photo-booth.tsx
├── pattern-picker.tsx
└── form.tsx
├── lib
├── constants.ts
├── hooks
│ ├── use-enter-submit.ts
│ └── use-media-query.ts
├── utils.ts
└── actions.ts
├── .env.example
├── .gitignore
├── tsconfig.json
├── next.config.js
├── package.json
├── tailwind.config.ts
└── README.md
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/bun.lockb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/steven-tey/spirals/HEAD/bun.lockb
--------------------------------------------------------------------------------
/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/steven-tey/spirals/HEAD/app/favicon.ico
--------------------------------------------------------------------------------
/public/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/steven-tey/spirals/HEAD/public/logo.png
--------------------------------------------------------------------------------
/styles/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
--------------------------------------------------------------------------------
/app/opengraph-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/steven-tey/spirals/HEAD/app/opengraph-image.png
--------------------------------------------------------------------------------
/styles/ClashDisplay-Semibold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/steven-tey/spirals/HEAD/styles/ClashDisplay-Semibold.otf
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/prettier.config.js:
--------------------------------------------------------------------------------
1 | // prettier.config.js
2 | module.exports = {
3 | bracketSpacing: true,
4 | semi: true,
5 | trailingComma: "all",
6 | printWidth: 80,
7 | tabWidth: 2,
8 | plugins: ["prettier-plugin-tailwindcss"],
9 | };
10 |
--------------------------------------------------------------------------------
/components/icons/index.tsx:
--------------------------------------------------------------------------------
1 | export { default as Github } from "./github";
2 | export { default as Twitter } from "./twitter";
3 | export { default as LoadingCircle } from "./loading-circle";
4 | export { default as BuyMeACoffee } from "./buymeacoffee";
5 |
--------------------------------------------------------------------------------
/app/page.tsx:
--------------------------------------------------------------------------------
1 | import FormRSC from "@/components/form-rsc";
2 |
3 | export default function Home() {
4 | return (
5 |
15 | {count ? nFormatter(count) : "..."} photos generated and counting! 16 |
17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | experimental: { 4 | serverActions: true, 5 | }, 6 | images: { 7 | domains: [ 8 | "xd2kcvzsdpeyx1gu.public.blob.vercel-storage.com", 9 | "replicate.delivery", 10 | ], 11 | }, 12 | async redirects() { 13 | return [ 14 | { 15 | source: "/github", 16 | destination: "https://github.com/steven-tey/spirals", 17 | permanent: false, 18 | }, 19 | { 20 | source: "/deploy", 21 | destination: "https://vercel.com/templates/next.js/spirals", 22 | permanent: false, 23 | }, 24 | { 25 | source: "/t", 26 | destination: "/", 27 | permanent: false, 28 | }, 29 | ]; 30 | }, 31 | }; 32 | 33 | module.exports = nextConfig; 34 | -------------------------------------------------------------------------------- /app/sitemap.ts: -------------------------------------------------------------------------------- 1 | import { kv } from "@vercel/kv"; 2 | import { MetadataRoute } from "next"; 3 | 4 | export default async function sitemap(): Promise
3 | 7 | Generate beautiful AI spiral art with one click. Powered by Vercel and Replicate. 8 |
9 | 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
20 | Introduction · 21 | Tech Stack · 22 | Deploy Your Own · 23 | Author 24 |
25 |26 | Introducing Spirals 27 |
28 | 29 |39 | Generate beautiful AI spiral art with one click. Powered by{" "} 40 | 46 | Vercel 47 | {" "} 48 | and{" "} 49 | 55 | Replicate 56 | 57 | . 58 |
59 | 60 |127 | This can take anywhere between 20s-30s to run. 128 |
129 |26 | Choose a pattern 27 |
28 |Upload your own
55 |56 | Recommended: Square (1:1) ratio, with a black and white color 57 | scheme. You can also drag and drop an image here. 58 |
59 |Spirals
58 | 59 | 107 |114 | A project by{" "} 115 | 121 | Steven Tey 122 | 123 |
124 | 130 |Buy me a coffee
132 | 133 |