Skip to content

J-x-D/DIVE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIVE

DIVE is an application implemented by my students and me as part of my PhD. More details will follow soon.

Quick Start

Prerequisites

  • Docker and Docker Compose installed
  • Git

Setup

  1. Clone the repository:

    git clone https://github.com/J-x-D/DIVE.git
    cd DIVE
  2. Create a .env file in the root directory with the following variables:

    NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
    OPENAI_API_KEY=your_openai_api_key
  3. Start the application:

    docker-compose up --build
  4. Access the application:

Development

The application uses Docker Compose with hot reload enabled for both frontend and backend:

  • Frontend: Next.js application running on port 3000
  • Backend: Bun server running on port 8080

Code changes will automatically be reflected without restarting the containers.

Stopping the Application

docker-compose down

To remove all volumes as well:

docker-compose down -v

Architecture

  • Frontend: Next.js 14 with TypeScript, TailwindCSS, and shadcn/ui
  • Backend: Bun runtime with TypeScript
  • Database: Supabase (PostgreSQL)
  • AI: OpenAI API integration

Environment Variables

Variable Description
NEXT_PUBLIC_SUPABASE_URL Your Supabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEY Your Supabase anonymous key
OPENAI_API_KEY Your OpenAI API key
CODESPACE_NAME Automatically set in GitHub Codespaces

Troubleshooting

CORS Issues

CORS is configured on the backend to allow all origins. If you encounter CORS errors, ensure the containers are running and the backend is accessible.

Server Actions Errors in Codespaces

The application is configured to work with GitHub Codespaces. If you see "Invalid Server Actions request" errors, ensure the containers are restarted after the initial setup.

Container Issues

If containers fail to start, try rebuilding:

docker-compose down -v
docker-compose up --build

For more detailed Docker setup information, see DOCKER_SETUP.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages