Sorry, this page is no longer available
We may earn an affiliate commission when you visit our partners.
Course image
Trevor Sawler

This is the follow up to "Let's Build a Go Version of Laravel," and is intended for students who have already taken that course.

In the first part of this series, we built a re-usable Go module that gave us a lot of functionality, including html, json, and xml response types, support for Go templates and Jet templates to render pages, multiple database support, sessions, and more. This time around, we'll improve our Celeritas package and add the following functionality:

Read more

This is the follow up to "Let's Build a Go Version of Laravel," and is intended for students who have already taken that course.

In the first part of this series, we built a re-usable Go module that gave us a lot of functionality, including html, json, and xml response types, support for Go templates and Jet templates to render pages, multiple database support, sessions, and more. This time around, we'll improve our Celeritas package and add the following functionality:

  • Add support for remote file systems, including Amazon S3 buckets, Minio, sFTP, and WebDAV

  • Add support for Social Authentication using GitHub and Google (and you can add as many more as you like)

  • Add support for improved testing, including a Go version of Laravel's Dusk package, which takes a browser screen shot when testing functionality that renders a web page

  • Add support for "maintenance mode" using Remote Procedure Calls (RPC)

  • Improve our database migrations to support both raw SQL and soda's Fizz file format

  • Implement file upload functionality (with support for local and remote file systems)

  • Separate logic and routes for web and API

  • Make it easy for users to create tests by pre-populating stub test files and the appropriate setup_test.go files for their projects

By the time that you have completed this course, you will not only have a solid understanding of each of the things listed above, but also a reusable code base that will help you jump start your next project.

Enroll now

What's inside

Learning objectives

  • How to implement and use remote procedure calls (rpc) in go
  • How to upload files safely in go
  • How to integrate aws s3 buckets in a go application
  • How to integrate an ftp/sftp filesystem in go
  • How to implement social authentication in go

Syllabus

Introduction

An overview of what we will be covering in this course.

Just a bit about me and my background.

Make it easy for me to give help to you when you need it.

Read more

You probably already have Go installed, but let's make sure.

We need an integrated development environment (IDE), and Visual Studio code will do the trick.

Let's get started by setting up our project structure and creating a Workspace.

Let's make sure things are set up correctly before going any further.

An overview of what we are going to build in the coming sections.

Docker makes it ridiculously easy to create our remote file systems. Let's set them up.

Before we can use Minio, we need to set up an account. Let's do that.

Before we can use sftp and WebDAV, we have to set things up. Let's do that.

We want our file system services to have the same functionality, so let's set up a Go type to make that happen.

Let's write the connection logic for Minio, and implement the first of the four required functions: Put

Sometimes we need a listing of everything that is in a remote bucket. Let's write that code.

Let's take care of deleting one (or more) files from the remote file system.

Usually, you don't need to get a remote file and pull it down to the server, but at some point you might need to, so we might as well be complete and implement a Get function for our Minio filesystem package. Let's take care of that now.

Before we begin connecting our Minio filesystem to Celeritas, it will make things a lot simpler if we implement stubs for S3, sFTP, and WebDAV. Let's take care of that.

Before we can use our Minio filesystem, we need to make a few changes. Let's get started.

Let's run a quick test to make sure we can connect to our Minio file system.

Let's create a handler that will allow us to display the contents of our Minio file system.

Let's create the handler and route to display the upload page.

Let's create the handler and route to process uploaded files and copy them to the remote filesystem.

The final step in testing our Minio file system is implementing the delete functionality. Let's do that.

Let's get started with the Put function for sFTP file systems.

Let's implement the list function for our sFTP package, so we can list the contents of a remote directory.

Let's complete the stub Delete function so we can remove files from the sFTP server.

The last function we need to implement is Get, so let's take care of that.

Before we can use the sFTP  filesystem, we have to let Celeritas know that it exists. Let's take care of that.

Let's add support for our sFTP file system to our handlers.

Let's update our code to allow for putting this on our remote sFTP file system.

Let's implement deleting files from the remote sFTP file system in our handlers.

There is a (very well hidden) potential resource leak in our sftp.go file; let's find and fix it.

Let's get started with WebDAV by implementing the Put function to put files on the remote system.

Let's take care of listing the contents of a directory on the remote WebDAV file system.

Let's implement the delete function for our WebDAV file system, and update our handlers to use it.

Let's implement the Get function for WebDAV, so that we can pull a file from the WebDAV server to the server where our web application lives.

Let's try out our new WebDAV file system.

Let's get the necessary Amazon package installed, and implement the List function for our Amazon S3 file system.

Let's build the Put function for our Amazon S3 file system.

Let's take care of the delete function for our Amazon S3 file system.

Let's take care of the Delete function for our Amazon S3 file system.

Let's let Celeritas know about our S3 file system.

We need an S3 compatible bucket to connect to, so let's create one.

Let's update our handlers in the myapp project to work with our S3 file system.

Let's make sure everything worked.

Let's make uploading a file -- to any file system -- a one liner in our Celeritas project.

Let's make it easier to use our file systems by adding four fields to the Celeritas type.

Let's get started writing the code to make uploading files to any file system as simple as possible.

Uploading files to a server can be a major security risk. One important way to secure this is to limit uploads by mime type. Let's get started implementing this feature.

We don't want to hard code mime types and file size upload limit into our code, so let's allow users to specify the settings in the .env file, and read that into the Celeritas configuration when the application starts.

Before we can try things out, we need to add a couple of handlers and some routes to our myapp project. Let's do that.

Let's make sure that our new upload function works as expected.

An overview of what we'll do in this section.

Let's get started adding functionality to support Pop/Fizz database migrations to our code base.

Let's write the function that will create the up and down database migrations using the pop package.

Let's write the function that will run the pop migrations for us.

Let's write the function that lets users reverse database changes by running the down migration files.

Let's implement the functionality to permit users to run all the down migrations, in reverse order, and then all the up migrations -- in other words, to reset the database completely. This is often incredibly useful during development.

Let's make the changes needed in the Celeritas CLI to create sql or fizz migrations.

Let's try things out with our new "celeritas make migration" command.

Let's put a bit of a sanity check into our CLI so that users cannot create migrations until they have set up their database configuration.

Let's modify our CLI code to support Pop migrations, including migrate up, migrate down, and migrate reset.

We should probably update the make auth command to use pop migrations. Let's take care of that.

Let's try out the new version of the "make auth" command to ensure that everything works the way that it should.

Social Authentication, or Single Sign On, is very popular. In this section, we'll implement it for GitHub and Google, and allow users to sign on to our web app using either of those services.

Let's update our login.jet view to add a couple of buttons for social authentication using Google and GitHub.

Before we can use social authentication, we have to set up our providers. Let's get started.

Let's write the handler that takes care of what happens when the user clicks on the "Login using GitHub" button.

Once a user attempts to log in using GitHub (or any social authentication provider), the provider will send a post request to a handler on our system. Let's take care of implementing that handler.

Let's connect our SocialLogin and SocialCallback handlers to routes.

We need to set up a GitHub OAuth application before we can try out our social login, so let's take care of that now.

Let's try our our GitHub login functionality, and see what we got wrong.

Let's try logging the user out of our application.

Using gothic.Logout(w, r) does not actually remove the authentication token on GitHub, so users are still logged in to our web application as far as GitHub is concerned. This is a fairly dangerous security concern. Let's fix that.

Let's make sure that when we log out this time, our application is also logged out of GitHub.

Let's get the key and secret for Google OAuth2, and then add the entries to our .env file.

Let's add the provider for Google to our social login code.

Let's try logging in with Google and see if it works as expected.

Let's be a bit paranoid and make absolutely certain that logging out a user who logged in using Google actually revokes the login token by calling Google's API manually.

Let's make it simple to use the Celeritas package to build API end points by separating the route logic.

Laravel has a useful "maintenance mode" function built in; let's get started implementing similar functionality in Celeritas, but we'll use RPC, remote procedure calls, to make it work.

Let's start our application and make sure that we are listening on the RPC port.

Let's implement our maintenance mode middleware.

Let's make the necessary changes to our CLI to call the maintenance mode function using RPC.

Let's try out our maintenance mode functionality.

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Builds upon the first part of the series, providing a deeper dive into extending the Celeritas package with advanced features
Covers remote file system integration, including Amazon S3, Minio, sFTP, and WebDAV, which are essential for modern cloud-based applications
Explores social authentication using GitHub and Google, enabling developers to implement popular single sign-on methods
Features improved testing with a Go version of Laravel's Dusk package, which can help ensure web application functionality
Requires completion of the first course in the series, which may pose a barrier to entry for some learners
Improves database migrations to support both raw SQL and soda's Fizz file format, which may be useful for developers working with legacy systems

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Practical go framework building - part 2

According to learners, this course is a valuable follow-up to the first part, focusing on building out advanced features for the Go web framework Celeritas. Students particularly praise the practical, hands-on approach covering real-world topics like remote file systems (S3, sFTP, WebDAV, Minio) and social authentication (GitHub, Google). Reviewers appreciate the instructor's ability to explain complex concepts clearly and the depth of the material. While the course assumes prior knowledge from Part One, learners find the content directly applicable to building robust web applications in Go. A few mentions highlight the inclusion of RPC for maintenance mode and updated migration support (Fizz/Pop) as useful additions. Overall, the course is seen as a highly practical and well-explained next step.
Requires completing the previous course for context.
"As expected, this course builds directly on the Celeritas framework developed in Part One, so finishing that is essential."
"It's definitely a Part Two – don't skip the first course if you want to follow along effectively."
"Assumes you've taken the first part, which is fair given the title, but worth reiterating for others."
Focuses on building a reusable framework.
"The approach of building a reusable framework (Celeritas) is fantastic and provides a solid foundation for future projects."
"I enjoyed continuing to build on the Celeritas package; it's a great way to learn by doing."
"Learning to build a framework piece by piece like this is a valuable skill on its own."
Instructor explains concepts clearly and concisely.
"The instructor does a great job of explaining complex topics in an easy-to-understand manner."
"I really appreciate the clarity of the lectures; it made understanding things like RPC much easier."
"Explanations were clear and helped me grasp how these different pieces fit into the framework."
Course covers highly practical, real-world topics.
"This course is incredibly practical and helpful for anyone looking to build production-ready web applications in Go."
"The topics covered, like S3 integration and social auth, are exactly what I need for real projects."
"I loved how the course focused on building features relevant to modern web development, using technologies like S3, social auth, and RPC."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Let's Build a Go version of Laravel: Part Two with these activities:
Review Go Fundamentals
Reinforce your understanding of Go fundamentals, including syntax, data types, and control structures, to ensure a solid foundation for the course.
Browse courses on Go Programming Language
Show steps
  • Review Go syntax and data types.
  • Practice writing basic Go programs.
  • Familiarize yourself with Go's standard library.
Review 'The Go Programming Language'
Deepen your understanding of Go by studying a comprehensive guide that covers the language's core concepts and best practices.
Show steps
  • Read the chapters relevant to the course topics.
  • Work through the examples provided in the book.
  • Experiment with the code and try different approaches.
Implement a Simple REST API in Go
Gain practical experience with Go by building a REST API, which will reinforce your understanding of routing, handlers, and data serialization.
Show steps
  • Define the API endpoints and data models.
  • Implement the handlers for each endpoint.
  • Set up routing to map endpoints to handlers.
  • Test the API using tools like Postman or curl.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Follow Tutorials on Go Web Frameworks
Explore different Go web frameworks to understand their features and how they can simplify web development tasks.
Show steps
  • Research popular Go web frameworks (e.g., Gin, Echo, Fiber).
  • Choose a framework and follow a tutorial to build a simple web application.
  • Experiment with different features of the framework.
Document Your Learning Journey
Solidify your understanding by documenting your learning process, including challenges faced, solutions found, and key takeaways.
Show steps
  • Create a blog or online journal.
  • Write about the concepts learned in each module.
  • Share code snippets and examples.
  • Reflect on your progress and identify areas for improvement.
Contribute to a Go Project
Deepen your understanding of Go and software development by contributing to an open-source project, which will expose you to real-world code and collaboration.
Show steps
  • Find a Go project on GitHub that interests you.
  • Read the project's documentation and contribution guidelines.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.
Review 'Go in Action'
Gain practical insights into Go development by studying a book that focuses on real-world applications and problem-solving.
View Go in Action on Amazon
Show steps
  • Read the chapters relevant to your interests.
  • Try out the code examples and adapt them to your own projects.
  • Explore the different libraries and packages covered in the book.

Career center

Learners who complete Let's Build a Go version of Laravel: Part Two will develop knowledge and skills that may be useful to these careers:
Golang Developer
A Golang Developer specializes in building applications using the Go programming language. This course is directly applicable to a Golang Developer as the course focuses on building a practical and reusable Go module. The course covers a wide array of topics specific to building high quality Go based services including remote file systems, social authentication, and database migrations. The course’s focus on a reusable code base is also valuable. A learner should take this course to enhance their skills and grasp of Go development.
Backend Developer
A Backend Developer is responsible for the server side logic of applications, including databases, APIs, and server infrastructure. This course directly helps a Backend Developer by providing experience with building and enhancing a Go module that offers features like HTML, JSON, and XML response types, among others. The course delves into database support, including migrations using both raw SQL and Soda's Fizz format, which is critical for backend development. Furthermore, the course’s coverage of file uploads, remote file systems, and social authentication using platforms like GitHub and Google are directly applicable skills for a Backend Developer. A learner should take this course to add robust backend skills to their toolbelt, and directly apply its lessons.
Application Developer
An Application Developer builds software applications using programming languages. The course is directly applicable to an Application Developer who works with Go. This course covers a range of topics including building a Go module with database support, remote file systems, social authentication and testing. The course’s overall goal is to teach the learner to build a solid, reusable code base that can be used in new projects. This course helps developers create robust, portable applications. A learner should take this course to extend their practical experience building applications with Go.
Software Engineer
A Software Engineer designs, develops, and maintains software systems. This course is beneficial for a Software Engineer, as it focuses on building a modular Go application with many common features, such as database connections, session management, and remote file system support including Amazon S3, Minio, and sFTP which are all common in contemporary software engineering. Additionally, the course's emphasis on testing and implementing features like social authentication with GitHub and Google are relevant to modern software engineering practices. A software engineer will benefit from the course's focus on constructing real-world applications.
Full-Stack Developer
A Full Stack Developer works on both the front end and backend of applications. This course is most useful for the backend skills of a Full Stack Developer, particularly because the course focuses on practical backend development using Go, including database interactions, file management, social authentication, and API development along with other backend concerns. The course's approach to building a reusable Go module with features like multiple database support, remote file systems like Amazon S3, and social authentication with GitHub and Google addresses crucial backend needs. A learner should take this course to solidify their grasp of back end fundamentals.
Cloud Engineer
A Cloud Engineer focuses on designing, implementing, and maintaining cloud infrastructure and services. This course is relevant to the work of a Cloud Engineer, as it teaches how to integrate services like Amazon S3 buckets and Minio into a Go application. Specifically, the course’s focus on remote file systems, including sFTP and WebDAV, is directly applicable for cloud-based deployments. Additionally, an understanding of how to build and manage applications that interact with cloud-based file systems is valuable for a Cloud Engineer. A learner should take this course to gain hands on experience in deploying applications to the cloud.
API Developer
An API Developer builds and maintains application programming interfaces that allow software to communicate. This course may be useful for an API Developer as it covers several topics important to this role. This includes building a Go module with HTML, JSON, and XML response types; supporting multiple databases; separating logic and routes for web and API; and implementing remote procedure calls for functions like maintenance mode. These are all practical skills required to build and maintain functional APIs. Additionally the course’s implementation of a file upload functionality with support for local and remote filesystems would be useful. This course provides a broad set of skills.
DevOps Engineer
A DevOps Engineer is responsible for the practices and tools that enable faster and more reliable software deployment. A DevOps engineer may benefit from this course, as it has strong coverage of concepts important to this role including experience working with remote file systems like Amazon S3, Minio, and sFTP which is useful for deploying and managing application assets, and understanding automated testing practices, which are critical for CI/CD pipelines. The course’s coverage of remote procedure calls for managing maintenance mode for applications also fits well with DevOps concerns. This is a practical course for DevOps engineers.
Systems Architect
A Systems Architect designs the structure of IT systems, focusing on how the various components work together. A systems architect may find this course helpful as the course offers a practical view of how systems integrate. This includes the implementation of remote file systems, social authentication, and database migrations within a Go application. Such concepts are valuable when designing modern IT systems. Additionally, understanding the application of remote procedure calls for functions like maintenance mode would be valuable in systems design. This course provides a practical foundation for a Systems Architect.
Solutions Architect
A Solutions Architect designs and implements specific technical solutions to address business problems. This course may be useful for a Solutions Architect as it gives a practical view of how to develop real world solutions. The course emphasis on building a Go module covers practical features such as remote file systems including S3 buckets, social authentication, and database migrations. These are all valuable in the architecture of business solutions. The hands on approach is also a benefit to practitioners. A learner should take this course to gain practical experience in Go project architecture.
Technical Lead
A Technical Lead manages and guides a development team, setting technical direction for software projects. This course may be useful for a Technical Lead. It will broaden their knowledge on how to develop modern applications. This includes topics such as building a reusable Go module with remote file system integration, social authentication, and database migrations. The course also emphasizes testing and implementing features such as file uploads safely and separating logic for web and API. The knowledge and understanding of these features will be useful for a technical lead to guide and mentor their development team. A technical lead should take this course to broaden their understanding of application architecture.
Web Developer
A Web Developer builds and maintains websites and web applications. While this course focuses on back end topics, a Web Developer may find it useful. The course offers an understanding of web development fundamentals including remote file system integration (such as S3 for hosting assets), API building, and database migrations. These skills are especially useful for applications that need an efficient backend. The course also covers social authentication with providers like GitHub and Google. A learner should take this course to broaden their understanding of application architecture.
Software Consultant
A Software Consultant advises clients on software strategies and technical solutions. This course may be useful for a Software Consultant, as it provides an overview of Go application development with an emphasis on reusable components, such as social authentication, file system integration, remote procedure calls, and database migrations. This practical experience will allow them to make more informed recommendations to clients. The course's hands on approach is particularly relevant, giving the consultant experience with the full software development lifecycle. A learner should take this course to broaden their technical expertise.
Database Administrator
A Database Administrator is responsible for the performance and security of databases. This course may be useful for a Database Administrator. The course covers database migrations using both raw SQL and Soda’s Fizz file format, as well as multiple database support. While this is not the primary focus of the course, understanding how applications interact with databases is useful for a Database Administrator. This knowledge can help them in planning, configuring, and maintaining database environments. A learner should take this course to get a fresh perspective on database interactions.
Mobile Developer
A Mobile Developer builds applications for mobile devices. This course may be useful for a Mobile Developer who needs to develop a backend for their mobile applications. The course covers implementing a Go module that supports APIs and remote file systems which can be used by mobile applications. The course also covers authentication using social providers. A mobile developer can build a more complete mobile offering by taking this course. A learner should take this course to broaden their knowledge about building application backends.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Let's Build a Go version of Laravel: Part Two.
Comprehensive guide to the Go programming language. It covers the language's syntax, semantics, and standard library in detail. It useful reference for understanding the underlying concepts used in the course and for deepening your knowledge of Go. This book is commonly used as a textbook at academic institutions.
Provides a practical, hands-on approach to learning Go. It focuses on building real-world applications and solving common problems. It is particularly useful for understanding how to apply Go to various domains, including web development and system programming. This book adds more breadth to the existing course.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser