Welcome to Helios-Imagery! This project aims to build an epic website to generate and display Helios-themed images created by OpenAI.
sequenceDiagram
participant User
participant Website
participant Backend
participant OpenAI
participant S3
User->>Website: Request to generate image
Website->>Backend: API call to generate image
Backend->>OpenAI: Request to generate image
OpenAI-->>Backend: Generated image
Backend->>S3: Store image
Backend-->>Website: Image URL
Website-->>User: Display image
To get started with the DevContainer for this repository, follow these steps:
-
Clone the Repository:
git clone <repository-url> cd <repository-directory>
-
Copy the Sample Environment File:
cp .devcontainer/.env.sample .devcontainer/.env
-
Fill in the Environment Variables: Open the
.devcontainer/.envfile and fill in the required environment variables. For example:MONGO_INITDB_ROOT_PASSWORD=yourRootPassword MONGO_PASSWORD=yourMongoPassword MINIO_ROOT_USER=yourMinioUser MINIO_ROOT_PASSWORD=yourMinioPassword
-
Open the Repository in Visual Studio Code:
code . -
Reopen in Container:
- Press
F1to open the command palette. - Type and select
Remote-Containers: Reopen in Container.
- Press
-
Wait for the Container to Build: The first time you build the container, it may take a few minutes as it sets up the environment.
-
Log into Minio:
- Open your web browser and navigate to
http://localhost:9000. - Log in using the
MINIO_ROOT_USERandMINIO_ROOT_PASSWORDyou specified in the.envfile.
- Open your web browser and navigate to
To run the Next.js app, follow these steps:
-
Install Dependencies: Navigate to the
appdirectory and install the required dependencies:cd app npm install -
Run the Development Server: Start the Next.js development server:
npm run dev
-
Open the App in Your Browser: Open your web browser and navigate to
http://localhost:3000to see the app in action. -
Build the App for Production: To build the app for production, run:
npm run build
-
Start the Production Server: After building the app, you can start the production server with:
npm start
Enjoy building and exploring Helios-Imagery!
