Rename project to apocapoc-api
Update module name and all imports from habit-tracker-api to apocapoc-api. This reflects the project's new branding as part of the apocapoc ecosystem (apocapoc-api, apocapoc-web, apocapoc-android).
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
DB_TYPE=sqlite
|
DB_TYPE=sqlite
|
||||||
DB_PATH=./data/habits.db
|
DB_PATH=./data/apocapoc.db
|
||||||
|
|
||||||
PORT=8080
|
PORT=8080
|
||||||
HOST=0.0.0.0
|
HOST=0.0.0.0
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ data/
|
|||||||
*.db
|
*.db
|
||||||
*.db-shm
|
*.db-shm
|
||||||
*.db-wal
|
*.db-wal
|
||||||
habit-tracker-api
|
apocapoc-api
|
||||||
dist/
|
dist/
|
||||||
bin/
|
bin/
|
||||||
.internal-notes/
|
.internal-notes/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Habit Tracker API
|
# Apocapoc
|
||||||
|
|
||||||
Self-hosted habit tracking service with a clean, hexagonal architecture.
|
Self-hosted habit tracking service with a clean, hexagonal architecture.
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Self-hosted habit tracking service with a clean, hexagonal architecture.
|
|||||||
|
|
||||||
1. Download the latest release
|
1. Download the latest release
|
||||||
2. Copy `.env.example` to `.env` and configure
|
2. Copy `.env.example` to `.env` and configure
|
||||||
3. Run: `./habit-tracker-api`
|
3. Run: `./apocapoc-api`
|
||||||
|
|
||||||
The API will be available at `http://localhost:8080`
|
The API will be available at `http://localhost:8080`
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -7,12 +7,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"habit-tracker-api/internal/application/commands"
|
"apocapoc-api/internal/application/commands"
|
||||||
"habit-tracker-api/internal/application/queries"
|
"apocapoc-api/internal/application/queries"
|
||||||
"habit-tracker-api/internal/infrastructure/auth"
|
"apocapoc-api/internal/infrastructure/auth"
|
||||||
"habit-tracker-api/internal/infrastructure/config"
|
"apocapoc-api/internal/infrastructure/config"
|
||||||
httpInfra "habit-tracker-api/internal/infrastructure/http"
|
httpInfra "apocapoc-api/internal/infrastructure/http"
|
||||||
"habit-tracker-api/internal/infrastructure/persistence/sqlite"
|
"apocapoc-api/internal/infrastructure/persistence/sqlite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module habit-tracker-api
|
module apocapoc-api
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.0
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package commands
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/domain/repositories"
|
"apocapoc-api/internal/domain/repositories"
|
||||||
"habit-tracker-api/internal/domain/value_objects"
|
"apocapoc-api/internal/domain/value_objects"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateHabitCommand struct {
|
type CreateHabitCommand struct {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockHabitRepo struct {
|
type mockHabitRepo struct {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/domain/repositories"
|
"apocapoc-api/internal/domain/repositories"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MarkHabitCommand struct {
|
type MarkHabitCommand struct {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/domain/value_objects"
|
"apocapoc-api/internal/domain/value_objects"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockEntryRepo struct {
|
type mockEntryRepo struct {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package commands
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/domain/repositories"
|
"apocapoc-api/internal/domain/repositories"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/repositories"
|
"apocapoc-api/internal/domain/repositories"
|
||||||
"habit-tracker-api/internal/shared/utils"
|
"apocapoc-api/internal/shared/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TodaysHabitDTO struct {
|
type TodaysHabitDTO struct {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/domain/value_objects"
|
"apocapoc-api/internal/domain/value_objects"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockHabitRepo struct {
|
type mockHabitRepo struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package queries
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/repositories"
|
"apocapoc-api/internal/domain/repositories"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package entities
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/value_objects"
|
"apocapoc-api/internal/domain/value_objects"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Habit struct {
|
type Habit struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/value_objects"
|
"apocapoc-api/internal/domain/value_objects"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewHabit(t *testing.T) {
|
func TestNewHabit(t *testing.T) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HabitEntryRepository interface {
|
type HabitEntryRepository interface {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package repositories
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HabitRepository interface {
|
type HabitRepository interface {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package repositories
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserRepository interface {
|
type UserRepository interface {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"habit-tracker-api/internal/application/commands"
|
"apocapoc-api/internal/application/commands"
|
||||||
"habit-tracker-api/internal/application/queries"
|
"apocapoc-api/internal/application/queries"
|
||||||
"habit-tracker-api/internal/infrastructure/auth"
|
"apocapoc-api/internal/infrastructure/auth"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AuthHandlers struct {
|
type AuthHandlers struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"habit-tracker-api/internal/infrastructure/auth"
|
"apocapoc-api/internal/infrastructure/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
type contextKey string
|
type contextKey string
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/application/commands"
|
"apocapoc-api/internal/application/commands"
|
||||||
"habit-tracker-api/internal/application/queries"
|
"apocapoc-api/internal/application/queries"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package http
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"habit-tracker-api/internal/infrastructure/auth"
|
"apocapoc-api/internal/infrastructure/auth"
|
||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/go-chi/chi/v5/middleware"
|
"github.com/go-chi/chi/v5/middleware"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHabitEntryRepositoryCreate(t *testing.T) {
|
func TestHabitEntryRepositoryCreate(t *testing.T) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/domain/value_objects"
|
"apocapoc-api/internal/domain/value_objects"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHabitRepositoryCreate(t *testing.T) {
|
func TestHabitRepositoryCreate(t *testing.T) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"habit-tracker-api/internal/domain/entities"
|
"apocapoc-api/internal/domain/entities"
|
||||||
"habit-tracker-api/internal/shared/errors"
|
"apocapoc-api/internal/shared/errors"
|
||||||
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user