You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1
+
# Pictoria AI - Personalized AI Photo Generation Platform
2
2
3
-
## Getting Started
3
+
Transform your photos with the power of AI! Pictoria AI is your ultimate solution for creating/generating professional AI-generated photos, similar to the popular PhotoAI platform. Perfect for LinkedIn headshots, Instagram content, dating profile pictures, and professional portraits. Train AI model on your personal images and generate stunning, high-quality AI-generated photos within minutes.
For stock images (not for training), I have used [Lummi AI](https://www.lummi.ai/)
99
+
100
+
### 6. Model Training Requirements
101
+
102
+
When training your custom model, ensure:
103
+
- 10-15 images in total
104
+
- Recommended breakdown for 12 images:
105
+
- 6 face closeups
106
+
- 3-4 half body closeups
107
+
- 2-3 full body shots
108
+
- No accessories on face/head
109
+
- Different expressions, clothing, backgrounds
110
+
- 1:1 resolution (1048x1048 or higher)
111
+
- Images under 45MB total size
112
+
113
+
### 7. Stripe Setup
114
+
115
+
Watch our detailed video tutorial for Stripe integration setup: [Stripe Setup Tutorial](https://www.youtube.com/watch?v=7AQNeii5K7E&t=27960s)
116
+
117
+
### 8. Start Development Server
6
118
7
119
```bash
8
120
npm run dev
9
121
# or
10
122
yarn dev
11
123
# or
12
124
pnpm dev
13
-
# or
14
-
bun dev
15
125
```
16
126
17
-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
127
+
Visit `http://localhost:3000` to see your app.
128
+
129
+
## 📦 Project Structure
130
+
131
+
```
132
+
├── app/ # Next.js 15 app directory
133
+
├── components/ # React components
134
+
├── lib/ # Utility, Supabase & Stripe functions
135
+
├── public/ # Static assets
136
+
└── globals.css # Global styles
137
+
```
18
138
19
-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
139
+
## 💰 Pricing Plans
20
140
21
-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
147
+
For a complete setup walkthrough, check out our [video tutorial](https://youtu.be/7AQNeii5K7E).
26
148
27
-
-[Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
-
-[Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
149
+
## 🌟 Show Your Support
29
150
30
-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
151
+
Give a ⭐️ if this project helped you!
31
152
32
-
## Deploy on Vercel
153
+
If you have any question or want a custom build for your business, you can reach out to me via:
33
154
34
-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
* Note: this is a private table that contains a mapping of user IDs to Stripe customer IDs.
166
+
*/
167
+
createtablecustomers (
168
+
-- UUID from auth.users
169
+
id uuid referencesauth.usersnot nullprimary key,
170
+
-- The user's customer ID in Stripe. User must not be able to update this.
171
+
stripe_customer_id text
172
+
);
173
+
altertable customers enable row level security;
174
+
-- No policies as this is a private table that the user must not have access to.
175
+
176
+
/**
177
+
* PRODUCTS
178
+
* Note: products are created and managed in Stripe and synced to our DB via Stripe webhooks.
179
+
*/
180
+
createtableproducts (
181
+
-- Product ID from Stripe, e.g. prod_1234.
182
+
id textprimary key,
183
+
-- Whether the product is currently available for purchase.
184
+
active boolean,
185
+
-- The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions.
186
+
name text,
187
+
-- The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
188
+
description text,
189
+
-- A URL of the product image in Stripe, meant to be displayable to the customer.
190
+
image text,
191
+
-- Set of key-value pairs, used to store additional information about the object in a structured format.
192
+
metadata jsonb
193
+
);
194
+
altertable products
195
+
enable row level security;
196
+
create policy "Allow public read-only access."on products
197
+
for select using (true);
198
+
199
+
/**
200
+
* PRICES
201
+
* Note: prices are created and managed in Stripe and synced to our DB via Stripe webhooks.
-- The ID of the prduct that this price belongs to.
209
+
product_id textreferences products,
210
+
-- Whether the price can be used for new purchases.
211
+
active boolean,
212
+
-- A brief description of the price.
213
+
description text,
214
+
-- The unit amount as a positive integer in the smallest currency unit (e.g., 100 cents for US$1.00 or 100 for ¥100, a zero-decimal currency).
215
+
unit_amount bigint,
216
+
-- Three-letter ISO currency code, in lowercase.
217
+
currency textcheck (char_length(currency) =3),
218
+
-- One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
219
+
type pricing_type,
220
+
-- The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
221
+
interval pricing_plan_interval,
222
+
-- The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
223
+
interval_count integer,
224
+
-- Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
225
+
trial_period_days integer,
226
+
-- Set of key-value pairs, used to store additional information about the object in a structured format.
227
+
metadata jsonb
228
+
);
229
+
altertable prices
230
+
enable row level security;
231
+
create policy "Allow public read-only access."on prices
232
+
for select using (true);
233
+
234
+
/**
235
+
* SUBSCRIPTIONS
236
+
* Note: subscriptions are created and managed in Stripe and synced to our DB via Stripe webhooks.
-- The status of the subscription object, one of subscription_status type above.
244
+
status subscription_status,
245
+
-- Set of key-value pairs, used to store additional information about the object in a structured format.
246
+
metadata jsonb,
247
+
-- ID of the price that created this subscription.
248
+
price_id textreferences prices,
249
+
-- Quantity multiplied by the unit amount of the price creates the amount of the subscription. Can be used to charge multiple seats.
250
+
quantity integer,
251
+
-- If true the subscription has been canceled by the user and will be deleted at the end of the billing period.
252
+
cancel_at_period_end boolean,
253
+
-- Time at which the subscription was created.
254
+
created timestamp with time zone default timezone('utc'::text, now()) not null,
255
+
-- Start of the current period that the subscription has been invoiced for.
256
+
current_period_start timestamp with time zone default timezone('utc'::text, now()) not null,
257
+
-- End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
258
+
current_period_end timestamp with time zone default timezone('utc'::text, now()) not null,
259
+
-- If the subscription has ended, the timestamp of the date the subscription ended.
260
+
ended_at timestamp with time zone default timezone('utc'::text, now()),
261
+
-- A date in the future at which the subscription will automatically get canceled.
262
+
cancel_at timestamp with time zone default timezone('utc'::text, now()),
263
+
-- If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will still reflect the date of the initial cancellation request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
264
+
canceled_at timestamp with time zone default timezone('utc'::text, now()),
265
+
-- If the subscription has a trial, the beginning of that trial.
266
+
trial_start timestamp with time zone default timezone('utc'::text, now()),
267
+
-- If the subscription has a trial, the end of that trial.
268
+
trial_end timestamp with time zone default timezone('utc'::text, now())
269
+
);
270
+
altertable subscriptions
271
+
enable row level security;
272
+
create policy "Can only view own subs data."on subscriptions
0 commit comments