Skip to content

U-to-E/dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Harshith reddy
May 27, 2024
81ab54b · May 27, 2024

History

19 Commits
May 7, 2024
May 2, 2024
May 27, 2024
May 27, 2024
May 27, 2024
May 26, 2024
May 7, 2024
May 27, 2024
May 27, 2024
May 27, 2024
May 25, 2024
May 25, 2024
May 27, 2024
May 2, 2024
May 1, 2024
May 27, 2024
May 27, 2024
May 27, 2024
May 3, 2024
May 3, 2024
May 27, 2024
May 25, 2024

Repository files navigation

Student and Mentor Dashboard Setup

Stack

  • Go
  • HTMX
  • PostgreSQL
  • Gorm

Prerequisites

  1. Go: Ensure you have Go installed. You can download it from golang.org.
  2. PostgreSQL: Make sure PostgreSQL is installed and running.

Setup Options

1. Clone the Repository

  1. Open your terminal and clone the repository:

    git clone https://github.com/U-to-E/dashboard
    cd dashboard

2. Install Dependencies

  1. Install the necessary Go packages:

    go mod tidy

3. Create Environment File

  1. Create a .env file in the root of your project directory:

    vim .env
  2. Add the following content to the .env file:

    DB_HOST=localhost
    DB_PORT=5432
    DB_USER=postgres
    DB_PASSWORD=your_password
    DB_NAME=your_db_name
    SECRET=your_secret
    ADMIN_EMAIL=[email protected]
    ADMIN_PASS=your_admin_password
    EMAIL_ADDR=email
    EMAIL_PASS=pass
    EMAIL_SMTP=smtp.gmail.com
    EMAIL_PORT=587

Running the Application

Option 1: Binary Setup

  1. Build the binary:

    go build -o dashboard
  2. Run the binary:

    ./dashboard

Option 2: Build from Source

  1. Run the application directly from the source:

    go run main.go
  2. Open your browser and navigate to http://localhost:3000.

Option 3: Using Docker

  1. Create a Dockerfile in the root of your project directory with the following content:

    FROM golang:1.18-alpine
    
    WORKDIR /app
    
    COPY . .
    
    RUN go mod tidy
    RUN go build -o dashboard
    
    EXPOSE 3000
    
    CMD ["./dashboard"]
  2. Build the Docker image:

    docker build -t dashboard-app .
  3. Run the Docker container:

    docker run --env-file .env -p 3000:3000 dashboard-app
  4. Open your browser and navigate to http://localhost:3000.

About

Student and mentor dashboard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published