refactor(base): First commit - Stucture

This commit is contained in:
Nagih
2025-12-02 10:10:21 +07:00
commit c2f9c1ebe7
10 changed files with 65 additions and 0 deletions

0
.env.example Normal file
View File

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.env

0
Dockerfile Normal file
View File

0
Makefile Normal file
View File

23
README.md Normal file
View File

@@ -0,0 +1,23 @@
# 🔐 Authentication Service
> Service xác thực và phân quyền trong hệ thống Microservices - NoobLearn2Code Community
## 📖 Giới thiệu
Authentication Service chịu trách nhiệm xử lý xác thực người dùng, quản lý JWT tokens và phân quyền trong hệ thống microservices.
```
## 📝 License
MIT License - NoobLearn2Code Community
## 🤝 Contributing
Mọi đóng góp đều được chào đón! Vui lòng tạo issue hoặc pull request.
---
**Maintained by**: NoobLearn2Code Community
**Documentation**: [Wiki](https://github.com/nooblearn2code/auth-service/wiki)
**Issues**: [GitHub Issues](https://github.com/nooblearn2code/auth-service/issues)
```

17
cmd/api/main.go Normal file
View File

@@ -0,0 +1,17 @@
package main
import (
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, World!"))
})
log.Println("Starting server on :8080")
if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatalf("could not start server: %v\n", err)
}
}

0
compose.yml Normal file
View File

0
docs/db.sql Normal file
View File

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module auth-service
go 1.24.9

21
sqlc.yaml Normal file
View File

@@ -0,0 +1,21 @@
version: "2"
sql:
- engine: "postgresql"
queries: "./internal/infrastructure/persistence/postgres/sqlc/queries"
schema: "./internal/infrastructure/persistence/postgres/sqlc/schema"
gen:
go:
package: "database"
out: "./internal/infrastructure/persistence/postgres/sqlc/generated"
sql_package: "pgx/v5"
emit_interface: true
emit_json_tags: true
emit_db_tags: true
emit_prepared_queries: false
emit_exact_table_names: true
emit_empty_slices: true
emit_enum_valid_method: true
emit_all_enum_values: true
# DDD specific configurations
emit_pointers_for_null_types: true
emit_result_struct_pointers: true