SDF GO
A new way to create web applications using go and sdf framework
Explore the docs »
View Demo · Report Bug · Request Feature
Table of Contents
About The Project
Sdf is firstly created for my favorite web language, php! But in time I've looked go, c#, python (flask) and more languages for web just in case I need them. Then I noticed the power of go. I started this project like 2 days ago 30/01/2022 and it is now published under development version v1.0.
It is not finished or not available for production!
I will work on this project. This project is now my main focus.
Built With
- Gorilla Session
- Built-in Go Libraries
- Go v1.17
- FDB (flat json database created by devsimsek)
- devsimsek's goUtils
Most of the parts are created from scratch. Soon this framework will be independent
Getting Started
Please follow steps bellow.
Prerequisites
This is an example of how to prepare your application to use the sdf and how to install requirements of sdf.
- Git
- Go v1.17
Installation
-
Clone the repo
git clone https://github.com/devsimsek/sdf-go.git
-
Install Required Go Packages
go get
-
Enter your session secret in
.env
SESSION_SECRET='ENTER YOUR API';
-
Create Your Example Handler
package handlers import ( "SDF/core" "fmt" "net/http" ) func init() { core.RegisterHandle("/", homeHandler, "GET") } func homeHandler(w http.ResponseWriter, r *http.Request) { // Load View _, err := fmt.Fprintf(w, core.LoadView("views/home.html", core.PageData{ PageTitle: "Home", PageBody: map[string]interface{}{"version": "v1.0"}, })) core.CheckError(err) }
Usage
Just open handlers directory and create a new handler :) You should be good to go :)
For more examples, please refer to the Documentation
Roadmap
- Create Model Support (Maybe)
- Create Session Library
- Create Email Library
- Create Templating Engine (barebones)
- CSRF and DDOS protection
- Integration With sdf-php to sdf-go
- Release v1.0 Public
- Support MVC (Maybe)
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Devsimsek - @devsimsek - [email protected]
Project Link: https://github.com/devsimsek/sdf-go