Skip to content

a react frontend with wasm calculator and shader api which gets shader code form gemini api based on the prompt

Notifications You must be signed in to change notification settings

tusharxoxoxo/pheonix_shader_wasm_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shader API Project

This project is a full-stack application with a Bun/Vite frontend and Phoenix/Elixir backend.

Environment Variables

This project requires certain environment variables to be set. Create a .env file in the root directory with the following variables:

GEMINI_API_KEY=your_gemini_api_key_here
SECRET_KEY_BASE=your_secret_key_base_here

Important: Never commit the .env file to version control. The repository includes a .env.example file as a template.

Development Setup

Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
bun install
  1. Start the development server:
bun run dev

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Install dependencies:
mix deps.get
  1. Start the Phoenix server:
mix phx.server

Docker Deployment

To run the entire application using Docker:

  1. Build the Docker image:
docker build -t shader-api .
  1. Run the container:
docker run -p 80:80 shader-api

The application will be available at http://localhost.

Docker Commands Reference

  • Stop the container:
docker stop <container_id>
  • View running containers:
docker ps
  • View logs:
docker logs <container_id>

Project Structure

  • /frontend - Bun/Vite frontend application
  • /backend - Phoenix/Elixir backend application
  • Dockerfile - Multi-stage build file for production deployment
  • nginx.conf - Nginx configuration for serving the application

About

a react frontend with wasm calculator and shader api which gets shader code form gemini api based on the prompt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published