Code Monkey home page Code Monkey logo

superkit's Introduction

SUPERKIT

Build high-performance apps swiftly with minimal team resources in GO.

The project (for now) is in the experimental phase.

Table of content

Installation

Create your SUPERKIT project in a single command:

go run github.com/anthdm/superkit@master [yourprojectname]

You can now navigate to your project:

cd [myprojectname]

Run npm install to install both tailwindcss and esbuild locally.

npm install

If you run into dependency issues you can run:

go clean -modcache && go get -u ./...

If you have the authentication plugin enabled you need to migrate your database.

make db-up

Getting started

Application structure

assets

conf

db

events

handlers

types

views

Development server

You can run the development server with the following command:

make dev 

Hot reloading the browser

Hot reloading is configured by default when running your application in development.

NOTE: on windows or on in my case (WSL2) you might need to run make watch-assets in another terminal to watch for CSS and JS file changes.

Migrations

Create a new migration

make db-mig-create add_users_table

The command will create a new migration SQL file located at app/db/migrations/add_users_table.sql

Migrate the database

make db-up

Reset the database

make db-reset

Seeds

make db-seed

This command will run the seed file located at cmd/scripts/seed/main.go

Creating views with Templ

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

Validations

todo

Testing

Testing handlers

Create a production release

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

This will create a binary file located at /bin/app_prod.

Make sure you also set the correct application environment variable in your .env file.

SUPERKIT_ENV = production

superkit's People

Contributors

anthdm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.