Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Nandgopal-R @akshayks13 @SaranHiruthikM
* @IAmRiteshKoushik
100 changes: 100 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
version: '3'

vars:
ENVIRONMENT: "DEVELOPMENT2"
DB_URL: "postgresql://postgres:1234@localhost:5432/postgres"
GO_BIN:
sh: go env GOPATH
GOOSE_DRIVER: postgres
GOOSE_DBSTRING: "{{.DB_URL}}"
GOOSE_MIGRATION_DIR: ./db/migrations/
BIN_NAME:
sh: |
if [ "{{.OS}}" = "Windows_NT" ]; then
echo "bin/Am.EventKit.exe"
else
echo "bin/Am.EventKit"
fi

tasks:
setup:
desc: "Install CLI tools and setup development environment"
cmds:
- go install github.com/air-verse/air@latest
- go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
- go install github.com/evilmartians/lefthook@latest
- go install github.com/pressly/goose/v3/cmd/goose@latest
- lefthook install
- echo "All CLI tools installed successfully in {{.GO_BIN}}/bin"

dev:
desc: "Run the development server with hot reload"
cmds:
- air

build:
desc: "Build the application"
cmds:
- go mod tidy
- go fmt ./...
- go build -o {{.BIN_NAME}} main.go

run:
desc: "Build and run the application"
deps: [build]
cmds:
- ./{{.BIN_NAME}}

up:
desc: "Run all database migrations"
cmds:
- goose -dir {{.GOOSE_MIGRATION_DIR}} {{.GOOSE_DRIVER}} {{.GOOSE_DBSTRING}} up

upone:
desc: "Run one database migration at a time"
cmds:
- goose -dir {{.GOOSE_MIGRATION_DIR}} {{.GOOSE_DRIVER}} {{.GOOSE_DBSTRING}} up-by-one

seed:
desc: "Seed the database with test data (DEVELOPMENT environment only)"
deps: [build]
cmds:
- |
if [ "{{.ENVIRONMENT}}" = "DEVELOPMENT" ]; then
go run seed/seed.go seed/truncate.go seed/main.go -s
else
echo "Skipping seed: not in DEVELOPMENT environment."
fi

down:
desc: "Reset all database migrations"
cmds:
- goose -dir {{.GOOSE_MIGRATION_DIR}} {{.GOOSE_DRIVER}} {{.GOOSE_DBSTRING}} reset

downto:
desc: "Migrate down to a specific version"
vars:
VERSION: "{{.v | default \"0\"}}"
cmds:
- goose -dir {{.GOOSE_MIGRATION_DIR}} {{.GOOSE_DRIVER}} {{.GOOSE_DBSTRING}} down-to {{.VERSION}}

status:
desc: "Show migration status"
cmds:
- goose -dir {{.GOOSE_MIGRATION_DIR}} {{.GOOSE_DRIVER}} {{.GOOSE_DBSTRING}} status

clean:
desc: "Clean database data"
cmds:
- go run seed/seed.go seed/truncate.go seed/main.go -c

docker:
desc: "Start server with Docker"
cmds:
- docker compose up -d

pod:
desc: "Restart services with Podman"
cmds:
- podman compose down
- podman compose up -d
17 changes: 0 additions & 17 deletions anokha-backend.service

This file was deleted.

8 changes: 4 additions & 4 deletions api/accomodation/auth.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
Expand Down
6 changes: 3 additions & 3 deletions api/accomodation/bed.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
6 changes: 3 additions & 3 deletions api/accomodation/finance.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
8 changes: 4 additions & 4 deletions api/accomodation/form.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5/pgtype"
)
Expand Down
8 changes: 4 additions & 4 deletions api/accomodation/gate.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
Expand Down
6 changes: 3 additions & 3 deletions api/accomodation/hostel.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5/pgtype"
)
Expand Down
6 changes: 3 additions & 3 deletions api/accomodation/logs.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
8 changes: 4 additions & 4 deletions api/accomodation/panel.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
)
Expand Down
2 changes: 1 addition & 1 deletion api/accomodation/routes.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
mw "github.com/Thanus-Kumaar/anokha-2025-backend/middleware"
mw "github.com/Infinite-Sum-Games/Am.EventKit/middleware"
"github.com/gin-gonic/gin"
)

Expand Down
6 changes: 3 additions & 3 deletions api/accomodation/security.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
)
Expand Down
6 changes: 3 additions & 3 deletions api/analytics/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
6 changes: 3 additions & 3 deletions api/analytics/hospitality.controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
6 changes: 3 additions & 3 deletions api/analytics/quick.controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
2 changes: 1 addition & 1 deletion api/analytics/routes.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
mw "github.com/Thanus-Kumaar/anokha-2025-backend/middleware"
mw "github.com/Infinite-Sum-Games/Am.EventKit/middleware"
"github.com/gin-gonic/gin"
)

Expand Down
6 changes: 3 additions & 3 deletions api/attendance/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
2 changes: 1 addition & 1 deletion api/attendance/routes.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
mw "github.com/Thanus-Kumaar/anokha-2025-backend/middleware"
mw "github.com/Infinite-Sum-Games/Am.EventKit/middleware"
"github.com/gin-gonic/gin"
)

Expand Down
8 changes: 4 additions & 4 deletions api/auth/admin.login.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
Expand Down
10 changes: 5 additions & 5 deletions api/auth/forgot.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"strings"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/mail"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/mail"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
Expand Down
8 changes: 4 additions & 4 deletions api/auth/login.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
Expand Down
2 changes: 1 addition & 1 deletion api/auth/logout.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package api
import (
"net/http"

"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
)

Expand Down
10 changes: 5 additions & 5 deletions api/auth/register.controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"strings"
"time"

"github.com/Thanus-Kumaar/anokha-2025-backend/cmd"
db "github.com/Thanus-Kumaar/anokha-2025-backend/db/gen"
"github.com/Thanus-Kumaar/anokha-2025-backend/mail"
"github.com/Thanus-Kumaar/anokha-2025-backend/models"
"github.com/Thanus-Kumaar/anokha-2025-backend/pkg"
"github.com/Infinite-Sum-Games/Am.EventKit/cmd"
db "github.com/Infinite-Sum-Games/Am.EventKit/db/gen"
"github.com/Infinite-Sum-Games/Am.EventKit/mail"
"github.com/Infinite-Sum-Games/Am.EventKit/models"
"github.com/Infinite-Sum-Games/Am.EventKit/pkg"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
Expand Down
Loading