renamed project to superkit

This commit is contained in:
anthdm 2024-06-16 17:59:28 +02:00
parent 969e518462
commit 19996932bf
23 changed files with 42 additions and 42 deletions

View file

@ -32,7 +32,7 @@ Build high-performance apps swiftly with minimal team resources in GO.
# Installation
Create your SUPERKIT project in a single command:
```
go run github.com/anthdm/gothkit@master [yourprojectname]
go run github.com/anthdm/superkit@master [yourprojectname]
```
You can now navigate to your project:
@ -101,7 +101,7 @@ make db-seed
This command will run the seed file located at `cmd/scripts/seed/main.go`
# Creating views with Templ
Gothkit uses Templ as its templating engine. Templ allows you to create type safe view components that renders fragments of HTML. In-depth information about Templ can be found here:
superkit uses Templ as its templating engine. Templ allows you to create type safe view components that renders fragments of HTML. In-depth information about Templ can be found here:
[Templ documentation](https://templ.guide)
# Validations
@ -111,7 +111,7 @@ todo
## Testing handlers
# Create a production release
Gothkit will compile your whole application including its assets into a single binary. To build your application for production you can run the following command:
superkit will compile your whole application including its assets into a single binary. To build your application for production you can run the following command:
```
make build
```

View file

@ -4,8 +4,8 @@ import (
"log"
"os"
"github.com/anthdm/gothkit/db"
"github.com/anthdm/gothkit/kit"
"github.com/anthdm/superkit/db"
"github.com/anthdm/superkit/kit"
_ "github.com/mattn/go-sqlite3"

View file

@ -3,7 +3,7 @@ package app
import (
"AABBCCDD/app/events"
"github.com/anthdm/gothkit/event"
"github.com/anthdm/superkit/event"
)
// Events are functions that are handled in separate goroutines.

View file

@ -3,7 +3,7 @@ package handlers
import (
"AABBCCDD/app/types"
"github.com/anthdm/gothkit/kit"
"github.com/anthdm/superkit/kit"
)
func HandleAuthentication(kit *kit.Kit) (kit.Auth, error) {

View file

@ -3,7 +3,7 @@ package handlers
import (
"AABBCCDD/app/views/landing"
"github.com/anthdm/gothkit/kit"
"github.com/anthdm/superkit/kit"
)
func HandleLandingIndex(kit *kit.Kit) error {

View file

@ -6,8 +6,8 @@ import (
"AABBCCDD/plugins/auth"
"log/slog"
"github.com/anthdm/gothkit/kit"
"github.com/anthdm/gothkit/kit/middleware"
"github.com/anthdm/superkit/kit"
"github.com/anthdm/superkit/kit/middleware"
"github.com/go-chi/chi/v5"
chimiddleware "github.com/go-chi/chi/v5/middleware"

View file

@ -4,7 +4,7 @@ templ Navigation() {
<nav class="border-b py-3">
<div class="container mx-auto flex justify-between">
<div class="text-lg text-foreground">
<a href="/" class="font-semibold uppercase">Gothkit <span class="text-sm">v0.1</span></a>
<a href="/" class="font-semibold uppercase">superkit <span class="text-sm">v0.1</span></a>
</div>
<div class="flex gap-4 items-center">
<div>

View file

@ -16,7 +16,7 @@ templ Index() {
<h2 class="text-lg text-muted-foreground">Escape the JavaScript ecosystem</h2>
</div>
<div class="flex justify-center">
<a href="https://github.com/anthdm/gothkit" target="_blank" class="bg-primary w-fit rounded-md px-4 py-2 text-primary-foreground font-medium text-sm">What are you waiting for?</a>
<a href="https://github.com/anthdm/superkit" target="_blank" class="bg-primary w-fit rounded-md px-4 py-2 text-primary-foreground font-medium text-sm">What are you waiting for?</a>
</div>
</div>
</div>

View file

@ -1,9 +1,9 @@
package layouts
import "github.com/anthdm/gothkit/view"
import "github.com/anthdm/superkit/view"
var (
title = "GOTHKIT project"
title = "superkit project"
)
templ BaseLayout() {

View file

@ -8,7 +8,7 @@ import (
"net/http"
"os"
"github.com/anthdm/gothkit/kit"
"github.com/anthdm/superkit/kit"
"github.com/go-chi/chi/v5"
"github.com/joho/godotenv"
)

View file

@ -4,7 +4,7 @@ go 1.22.4
require (
github.com/a-h/templ v0.2.707
github.com/anthdm/gothkit v0.0.0-20240616091834-f28da98d2790
github.com/anthdm/superkit v0.0.0-20240616091834-f28da98d2790
github.com/go-chi/chi/v5 v5.0.12
github.com/google/uuid v1.6.0
github.com/joho/godotenv v1.5.1
@ -29,4 +29,4 @@ require (
)
// uncomment for local development on the superkit core.
// replace github.com/anthdm/gothkit => ../
// replace github.com/anthdm/superkit => ../

View file

@ -1,9 +1,9 @@
github.com/a-h/templ v0.2.707 h1:T1Gkd2ugbRglZ9rYw/VBchWOSZVKmetDbBkm4YubM7U=
github.com/a-h/templ v0.2.707/go.mod h1:5cqsugkq9IerRNucNsI4DEamdHPsoGMQy99DzydLhM8=
github.com/anthdm/gothkit v0.0.0-20240615140127-d74e729d7c71 h1:lTQ0cqCoXVCJRdAPjJTUhqHcAdF4EcAxARSgCO4Ny9o=
github.com/anthdm/gothkit v0.0.0-20240615140127-d74e729d7c71/go.mod h1:SFEB0yWZV7/rEtE+I3u3rJ7HXRWYAami+3gyAH+2d8c=
github.com/anthdm/gothkit v0.0.0-20240616091834-f28da98d2790 h1:Tt7InsQNmnrYwZW9SFNnSoBhdJgYvqF50wLb2kbeIVM=
github.com/anthdm/gothkit v0.0.0-20240616091834-f28da98d2790/go.mod h1:SFEB0yWZV7/rEtE+I3u3rJ7HXRWYAami+3gyAH+2d8c=
github.com/anthdm/superkit v0.0.0-20240615140127-d74e729d7c71 h1:lTQ0cqCoXVCJRdAPjJTUhqHcAdF4EcAxARSgCO4Ny9o=
github.com/anthdm/superkit v0.0.0-20240615140127-d74e729d7c71/go.mod h1:SFEB0yWZV7/rEtE+I3u3rJ7HXRWYAami+3gyAH+2d8c=
github.com/anthdm/superkit v0.0.0-20240616091834-f28da98d2790 h1:Tt7InsQNmnrYwZW9SFNnSoBhdJgYvqF50wLb2kbeIVM=
github.com/anthdm/superkit v0.0.0-20240616091834-f28da98d2790/go.mod h1:SFEB0yWZV7/rEtE+I3u3rJ7HXRWYAami+3gyAH+2d8c=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=

View file

@ -1,11 +1,11 @@
{
"name": "gothkit",
"name": "superkit",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gothkit",
"name": "superkit",
"version": "1.0.0",
"license": "ISC",
"dependencies": {

View file

@ -1,5 +1,5 @@
{
"name": "gothkit",
"name": "superkit",
"version": "1.0.0",
"description": "",
"main": "index.js",

View file

@ -1,7 +1,7 @@
package auth
import (
v "github.com/anthdm/gothkit/validate"
v "github.com/anthdm/superkit/validate"
"AABBCCDD/app/views/layouts"
"AABBCCDD/app/views/components"

View file

@ -10,8 +10,8 @@ import (
"strconv"
"time"
"github.com/anthdm/gothkit/kit"
v "github.com/anthdm/gothkit/validate"
"github.com/anthdm/superkit/kit"
v "github.com/anthdm/superkit/validate"
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
)

View file

@ -4,8 +4,8 @@ import (
"AABBCCDD/app/db"
"fmt"
"github.com/anthdm/gothkit/kit"
v "github.com/anthdm/gothkit/validate"
"github.com/anthdm/superkit/kit"
v "github.com/anthdm/superkit/validate"
)
var profileSchema = v.Schema{

View file

@ -3,7 +3,7 @@ package auth
import (
"fmt"
v "github.com/anthdm/gothkit/validate"
v "github.com/anthdm/superkit/validate"
"AABBCCDD/app/views/layouts"
)

View file

@ -1,7 +1,7 @@
package auth
import (
"github.com/anthdm/gothkit/kit"
"github.com/anthdm/superkit/kit"
"github.com/go-chi/chi/v5"
)

View file

@ -1,7 +1,7 @@
package auth
import (
v "github.com/anthdm/gothkit/validate"
v "github.com/anthdm/superkit/validate"
"AABBCCDD/app/views/layouts"
"AABBCCDD/app/views/components"
)

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/anthdm/gothkit
module github.com/anthdm/superkit
go 1.22.0

View file

@ -16,7 +16,7 @@ import (
const (
replaceID = "AABBCCDD"
bootstrapFolderName = "bootstrap"
reponame = "https://github.com/anthdm/gothkit.git"
reponame = "https://github.com/anthdm/superkit.git"
)
func main() {
@ -26,18 +26,18 @@ func main() {
fmt.Println()
fmt.Println("install requires your project name as the first argument")
fmt.Println()
fmt.Println("\tgo run gothkit/install.go [your_project_name]")
fmt.Println("\tgo run superkit/install.go [your_project_name]")
fmt.Println()
os.Exit(1)
}
projectName := args[0]
// check if gothkit folder already exists, if so, delete
_, err := os.Stat("gothkit")
// check if superkit folder already exists, if so, delete
_, err := os.Stat("superkit")
if !os.IsNotExist(err) {
fmt.Println("-- deleting gothkit folder cause its already present")
if err := os.RemoveAll("gothkit"); err != nil {
fmt.Println("-- deleting superkit folder cause its already present")
if err := os.RemoveAll("superkit"); err != nil {
log.Fatal(err)
}
}
@ -49,7 +49,7 @@ func main() {
}
fmt.Println("-- renaming bootstrap ->", projectName)
if err := os.Rename(path.Join("gothkit", bootstrapFolderName), projectName); err != nil {
if err := os.Rename(path.Join("superkit", bootstrapFolderName), projectName); err != nil {
log.Fatal(err)
}

View file

@ -5,8 +5,8 @@ import (
"fmt"
"net/url"
"github.com/anthdm/gothkit/kit"
"github.com/anthdm/gothkit/kit/middleware"
"github.com/anthdm/superkit/kit"
"github.com/anthdm/superkit/kit/middleware"
)
// Asset is view helper that returns the full asset path as a