Skip to content

iota-uz/elxolding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

ELXOLDING ERP - ERP system for tracking inventory using RFID technology.

Overview

Glossary

  • UHR - Unified Hourly Rate

Prerequisites

Development

Clone the repository

git clone https://github.com/iota-uz/iota-erp.git

Install dependencies

go get -u ./...

Install tailwindcss globally

pnpm install -g tailwindcss
# or
npm install -g tailwindcss

Run postgres

docker compose -f docker-compose.dev.yml up -d

Run migrations

sql-migrate up

Run in watch mode (hot reload)

air

Run templ in watch mode

templ generate -watch

Run tailwindcss in watch mode

tailwindcss -c tailwind.config.js -i internal/assets/css/main.css -o internal/assets/css/main.min.css --minify --watch

Now open postman and explore the GraphQL schema at http://localhost:3200/query

Examples

Get all employees and their positions

query Users {
    users(limit: 10, offset: 0) {
        total
        data {
            id
            email
            firstName
            lastName
            avatar {
                id
                size
            }
        }
    }
}

Reference commands

Run linter

golangci-lint run

Regenerate from GraphQL schema

go generate ./...

Running migrations

go run cmd/migrate/main.go up

Rolling back migrations

go run cmd/migrate/main.go down

Redoing migrations (useful for development)

sql-migrate redo

Making a migration

sql-migrate new <migration-name>

Running tests

go test -v ./...

Running tests with coverage

go test -coverprofile coverage/coverage.out ./... 
go tool cover -html=coverage/coverage.out

Running the server

go run cmd/server/main.go

Format templ files

templ fmt .

Conventions

Dev stand (staging)

URL

User: Admin User

Password

TestPass123!

To connect to staging db:

Hostname: elxolding-erp.ci.iota.uz
Port: 17899
Database: elxolding_db
Username: postgres
Password: EU4n3y8XeK8hia0L

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5