MCPcopy
hub / github.com/premieroctet/photoshot

github.com/premieroctet/photoshot @1.3.0 sqlite

repository ↗ · DeepWiki ↗ · release 1.3.0 ↗
104 symbols 395 edges 86 files 0 documented · 0%
README

Photoshot

Twitter

photobooth-ai.app

An open-source AI avatar generator web app

Photoshot

Try it out at photoshot.app

Stack

Getting Started

Install dependencies:

yarn install

You can use Docker to run a local postgres database and maildev server (accessible at http://localhost:1080):

docker-compose up -d

Create .env.local:

cp .env.example .env.local

Update environment variable values:

Environment Variable Explanation
DATABASE_URL The connection string for your PostgreSQL database. It will be postgresql://photoshot:photoshot@localhost:5432/photoshot if you are using the provided docket setup.
NEXTAUTH_URL The URL of your Next.js application, used for authentication purposes with NextAuth.js.
S3_UPLOAD_KEY The access key for your AWS S3 bucket used for storing pictures.
S3_UPLOAD_SECRET The secret key for your AWS S3 bucket used for storing pictures.
S3_UPLOAD_BUCKET The name of your AWS S3 bucket used for storing pictures.
S3_UPLOAD_REGION The AWS region where your S3 bucket is located.
REPLICATE_API_TOKEN The API token for Replicate.
REPLICATE_USERNAME The username associated with your Replicate account.
REPLICATE_MAX_TRAIN_STEPS The maximum number of training steps for the Dreambooth AI model. Defaults to 3000.
REPLICATE_NEGATIVE_PROMPT A prompt used for negative training examples in the Replicate AI model. Defualts to cropped face, cover face, cover visage, mutated hands
REPLICATE_HD_VERSION_MODEL_ID The version of the model for upscaling the generated images. Such models can be browsed here
NEXT_PUBLIC_REPLICATE_INSTANCE_TOKEN A unique identifier for the training data. It can be any string. For best results use an identifier containing three Unicode characters, without spaces e.g. cjw
SECRET A random string used for NextAuth.js authentication.
EMAIL_FROM The email address from which emails will be sent.
EMAIL_SERVER The SMTP server URL used for sending emails. It will be http://localhost:25 if you are using the provided docker setup,
STRIPE_SECRET_KEY The API key for your Stripe account.
NEXT_PUBLIC_STRIPE_STUDIO_PRICE The price of a studio in cents (e.g., 1000 = $10).
NEXT_PUBLIC_STUDIO_SHOT_AMOUNT The maximum number of shots allowed per studio.
OPENAI_API_KEY The API key for the OpenAI API, used for the prompt wizard feature.
OPENAI_API_SEED_PROMPT A seed prompt used for generating style prompts using the OpenAI API.

Please note that if you want to use the provided docker-compose setup you have to disable TLS in your .env.local by adding:

NODE_TLS_REJECT_UNAUTHORIZED = "0"

Run migrations

yarn prisma:migrate:dev

Run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Extension points exported contracts — how you extend this code

Session (Interface)
(no doc)
src/types/next-auth.d.ts
IStudioPageProps (Interface)
(no doc)
src/components/pages/StudioPage.tsx
ItemProps (Interface)
(no doc)
src/components/home/Features.tsx

Core symbols most depended-on inside this repo

useProjectContext
called by 5
src/hooks/use-project-context.ts
handleShotPayment
called by 3
src/components/projects/shot/BuyShotButton.tsx
formatStudioPrice
called by 3
src/core/utils/prices.ts
createPreviewMedia
called by 3
src/core/utils/upload.ts
getSession
called by 3
src/lib/sessions.ts
updateShotTemplate
called by 3
src/contexts/project-context.tsx
nextTimeout
called by 2
src/components/home/Slider.tsx
getRefinedStudioName
called by 2
src/core/utils/projects.ts

Shape

Function 101
Interface 3

Languages

TypeScript100%

Modules by API surface

src/contexts/project-context.tsx6 symbols
src/lib/sessions.ts4 symbols
src/core/utils/predictions.ts3 symbols
src/components/home/Slider.tsx3 symbols
src/components/home/Features.tsx3 symbols
src/app/(public)/prompts/dreambooth/[slug]/page.tsx3 symbols
src/core/utils/upload.ts2 symbols
src/components/projects/shot/ShotCard.tsx2 symbols
src/components/projects/shot/BuyShotButton.tsx2 symbols
src/components/projects/PromptImage.tsx2 symbols
src/components/pages/StudioPage.tsx2 symbols
src/components/layout/Footer.tsx2 symbols

Dependencies from manifests, versioned

@aws-sdk/client-s33.223.0 · 1×
@aws-sdk/s3-request-presigner3.223.0 · 1×
@chakra-ui/react2.4.2 · 1×
@emotion/react11.10.5 · 1×
@emotion/styled11.10.5 · 1×
@next-auth/prisma-adapter1.0.7 · 1×
@prisma/client4.7.1 · 1×
@stripe/react-stripe-js1.16.0 · 1×
@stripe/stripe-js1.46.0 · 1×
@types/mjml-react2.0.6 · 1×
@types/node18.11.10 · 1×
@types/nodemailer6.4.7 · 1×

For agents

$ claude mcp add photoshot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact