
Build a practical full stack starter with React and Go, covering registration, authentication, and role-based access with URLs, plus a product image dashboard and Redux-powered admin panel in Fiber framework.
install go on your machine by downloading the installer from the official site, choose macos, run the installer, enter the password, and use the terminal to confirm installation.
Learn to run Go code in a playground, declare a package, and import modules. Explore comments, formatting, and the rule that unused imports cause errors, with automatic semicolon insertion.
Create your first Go project by setting up a module, writing main.go with package main and func main, importing fmt, printing Hello, world, and running with go run.
Explore variables in Go, declare and print integers, int32, strings, and booleans, illustrate assignments and boolean negation, and introduce pointers.
Explore pointers by creating and initializing a string pointer, dereferencing to print values, and observing that addresses remain fixed while values change as you assign and update data.
discover how constants define unchangeable values, with numeric examples, type inference, iota sequences, and global constants accessible across files.
Explore arrays in Go: declare and initialize a three-integer array, access by index from zero, print the full array or a single element, and use the shorthand initializer.
Explains the difference between arrays and slices, highlighting dynamic lengths and how to add items. Demonstrates slicing syntax for printing ranges, end-based and index-based selections, and previews maps.
Master map structures by creating maps with string keys and integer values, updating and deleting entries, and exploring flexible value types, with practical examples leading to struct usage.
Explore how structs model objects with properties, including nested address, and how to initialize and print user data with default values. Note how Gorm is mentioned for future functionality.
Explore how to define and call functions in Go, pass parameters, return values, handle errors with multiple return types, and guard against division by zero.
Install and configure MySQL, download the community server, set up MySQL Workbench, connect to a local database, configure the timezone, and prepare the schema as a foundation for creating tables.
Learn how to set up and connect Go to a database using Gorm, install the driver, configure the connection, and verify success with a panic-based check.
Define a user struct with id, first name, last name, and email, then create a users table mirroring these fields using gorm.
Define a user struct with first name, last name, and email, then insert the record via db create with the user by reference, relying on the auto-incremented id.
Update a user record by using the user id to modify fields. Change first name, last name, and email, then delete a user by id in the database.
Populate the database with three users, iterate with a for loop using index and user, query the first and last records by reference, and update the last name to smith.
Learn to build Gorm models with a primary key, created and updated timestamps, and soft delete via a deleted_at field, plus adding indexes and constraints.
Explore adding constraints in a Go GORM user model, including unique email, field types and sizes, and validations, then mapping to the database with nullable fields.
Modify the database by adding nullable and not nullable fields, manage a unique email index, apply default values like Smith, and test inserting a user to observe constraints.
Explore nullstring types and nullable strings, using Escorial to store either now or a string, validate emails, and manage default values before building relationships.
Explore foreign keys by linking the users and address tables, establishing user_id as the foreign key, and using Gorm to preload the related address with the user.
Establish many-to-many relations using an in-between table, as shown by linking users and books with a user_books table in a gorm setup.
Build and manage an admin dashboard that displays daily sales, creates and updates users with roles and permissions, adds products with image uploads, exports orders, and updates reflect instantly.
Install the go toolchain from golang.org, create a go file named main, declare package main and a main function, import a package, print Hello World, then run with go run.
Discover the fiber framework, an express-inspired Go framework, install it with go get, set GOPATH, run the server on port 8000, and view it on localhost:8000.
Explore variables and pointers in go, showing how to declare integers and strings, initialize pointers, and print values and addresses to understand memory references.
Connect a Go app to a MySQL database using Gorm. Install MySQL server and Workbench, import Gorm and MySQL driver, configure localhost DNS, and handle errors with multiple return values.
Organize a Go project by structuring folders for database and controllers, exporting functions with capitalized names, and importing and using them across packages via proper paths.
Create a user struct and model in Go, then implement a register function using a post request to register users via API, setting first name, last name, email, and password.
Use the realize package in Go to automatically listen for file changes and restart the fiber server, removing manual restarts and speeding up development.
Create a user table via migration, adding first name, last name, email, and password; ensure email is unique with Gorm, run migrations, and apply changes.
Register a user by sending first name, last name, email, and password, verify the passwords match, and return 400 with a message that passwords do not match.
Hash the password with the Decrypt package and a cost of 14, convert the string to bytes, run the migration, and register the new user in the database.
Build a login function with a post request, fetch the user by email, verify the password, handle not found and incorrect password, and prepare for a jwt token.
Generate a JWT by creating claims, set issuer and expiration, sign with a secret key using HS256, and return the token to authenticate and send to the back end.
Demonstrates authenticating a user by reading a cookie, decoding a jwt, extracting standard claims including issuer, and fetching the user from the database to return authenticated user data.
Learn how to implement logout by invalidating the session cookie, setting its expiration to the past, returning a success message, and confirming unauthenticated status after logout.
In this lecture, learn how to format JSON output in Go by annotating struct fields with JSON tags to produce snake_case names and omit the password when returning user data.
Create a jwt-based authentication middleware for a fiber app, generate and pass jwt tokens via util, protect routes with the middleware, and handle unauthenticated responses.
Develop a Go user controller to handle CRUD operations, including fetching all users and creating a new user with an auto-generated password, returning JSON responses.
Learn to add methods to a struct for password management, including set password and compare hashed passwords, replacing decrypt, and applying these in login and user creation.
Implement the full user CRUD: get user by id, convert id from string to unsigned int, query the database, then update and delete operations.
Create a role model with id and name, migrate a roles table, and implement CRUD routes for roles, then test by creating admin, Ed, and viewer roles in the browser.
Learn how to implement foreign keys to link users to roles, set up role_id, and preload roles in queries using gorm for consistent user role management.
Create the permission model, add to the database, and set up a many-to-many link between roles and permissions with gorm, listing video, view urls, edit roads, and view products.
Learn how to manage a many-to-many relation between roles and permissions by creating a role, converting inputs to permission IDs, and updating to replace old permissions.
implement user pagination by applying a limit and offset, and return a response that includes the current page, total users, and last page for front end navigation.
Update your own profile data and password for an authenticated user using the update info and update password endpoints. Validate password and password confirm, then update the user model.
Define a product model with id, title, description, image, and price, map it to a database table with json responses, create, get, update, and delete operations in a product controller.
Define a generic entity interface with count and take, implement it for product and user models, and refactor data access by passing the database parameter for flexible, user-ready pagination.
Learn to upload images by posting to api/upload with form data, handle multiple files, save to an upload directory, return the file URL, and serve static files.
Create and relate order and order item models using Go and Gorm, preload order items, seed data, and expose a controller to fetch orders with their items.
Combine first name and last name into a single name field, add a computed total from order items, and expose these fields on the frontend without creating new database columns.
Learn to export orders to csv by creating a file, writing headers (id, name, email, product title, price, quantity) and order data, and enabling download via an export endpoint.
Execute raw sql to pull daily sales by joining orders and order_items, sum price times quantity, format dates to day level, and expose a chart-ready sales dataset for the frontend.
Develop a permission middleware that checks a user’s role-based permissions for each page, loading the user and role, validating view or edit rights, and returning unauthorized when needed.
Create a new React app using the TypeScript template after downloading and installing the tools. Run npm start to launch the React app on port 3000 and begin making changes.
Open the project, integrate bootstrap, and paste the dashboard template into the main React file. Clean up markup, fix className changes, close inputs, replace conflicting styles, and preview the dashboard.
Explore building components in a React and Golang course by creating navigation and menu components in TypeScript, using class and hook methods, with import/export patterns.
Create and route two components—dashboard and users—using react-router-dom and a browser router, linking with exact paths and a navigation menu to render on '/dashboard' and '/users'.
Learn to create a wrapper component that provides a unique template for the register page, move shared layout, and render children via props in a React app.
Learn to post data to a server with axios in TypeScript, calling the register endpoint and handling responses with then or async/await.
Learn to implement a login flow by redirecting from register to login using state management and redirect logic in a React app.
Learn to manage state in React with useState, initializing count at zero, updating it via setCount from an input, and reflecting changes in the display.
Build a React login form that uses useState for email and password, submits via axios to the login API with credentials, and redirects on success.
Display the logged-in user's name by converting to a function component and using useEffect to fetch user data with axios, handling authentication with credentials.
Set global axios defaults by defining a base prefix for endpoints (e.g., register) and enabling withCredentials, improving endpoint cleanliness and reliably fetching the authenticated user.
Implement logout functionality in a react and golang course project by posting a logout request, clearing the JWT, and redirecting to login, with guarded routes from the dashboard.
Create a user model in a models folder with public properties for id, first name, last name, and email; initialize them in the constructor and add a full name getter.
Learn how NavLink highlights the current route with an active class and how to customize the class name, such as active plus name, with exact to fix subpath highlighting.
Create a dedicated users folder, fetch all users with axios inside a useEffect, store them with useState, and render a mapped table showing id, full name, email, and role.
Learn to implement paginated user lists in React by adding next and prev controls, managing page state, and reloading data with useEffect when the page changes.
Wire a delete button to a function, confirm before deleting, send a backend delete request, and update the frontend list to remove the user.
Create users in a React app by building a user create form, fetching roles with axios, posting to create, and redirecting on success.
Build a user edit flow that mirrors user creation, link each user to /users/{id}/edit, fetch current data with an api call, prefill the form, and submit updates.
Build a roles management page by creating a roles component, adding it to the menu, and rendering a table of roles with delete and confirmation actions.
Create and manage roles by building a dynamic form with permissions checkboxes, handling state and submissions, and redirecting after creation.
Update and prefill role data by fetching role details, selecting permissions, and submitting a put request to save changes in a React and Golang application.
Develop a dynamic product page by creating a products component, fetching data with axios, and rendering a table with image, title, description, and price, plus delete actions and pagination.
Learn to implement a pagination component for products and users by extracting logic into generator, passing last page as a prop, and handling page changes with a page changed callback.
Create a product feature by building a TSX React component with a form for title, description, image, and price, wiring onChange handlers and a submit function to create products.
Learn to implement image uploading in a product creation flow by wiring an image input, using form data, and triggering a server upload from a dedicated image component.
Learn to use useRef for editing products: prefill data with axios, update title, description, image, and price, and trigger updates with ref-based inputs.
Create a new orders component and define order and order item models to manage data; render a paginated table showing orders and their items with product title, quantity, and price.
Add button-driven animations by toggling a selected item with useState, using max-height transitions and overflow hidden to reveal or collapse content with a 1000 ms transition.
Add an export button for csv, call the backend to export data via a post request, build a text/csv blob from the response, and trigger a download with a link.
Install c3 and the types for typescript, create a dashboard, and generate a chart in a React component by binding backend data to the x-axis dates and y-axis sales.
Build a profile page with two forms to update user data and password, prefilling fields with useEffect and preparing to fix updates with redux.
Install redux with npm, including react-redux and the TypeScript version, scaffold actions and reducers, configure the store, and implement a set user action with an immutable user reducer.
Learn to implement Redux in a React app by wiring user data through connect, mapStateToProps, and mapDispatchToProps, dispatching setUser, and sharing the user across components.
Deploy your app on Google Cloud using the free $300 credit, create a new project named admin, and prepare to push to Google Cloud by creating a database.
Learn to connect a Google Cloud SQL database to your app by enabling the Cloud SQL API, creating a MySQL instance, and authorizing your network for secure access.
Migrate the go project to modules by initializing go.mod with the project name, align imports to the module path, and install fiber v2 and the database driver.
Install and configure Docker, create a Dockerfile for a Go project, build and run a container, expose port 8000, test the API with Postman, and prepare for Google Cloud deployment.
Configure environment variables in docker compose to manage database credentials and the secret key across local, staging, and production. Build and run the backend with docker compose up.
Install the google cloud sdk across macos, windows, and linux, then run gcloud auth login and gcloud config set project to prepare for building and pushing to the container registry.
Push the API image to Google Cloud Container Registry by building with Docker Compose, tagging the image for GCR, and pushing it so the image appears in the registry.
Deploy a container image to Cloud Run, configure environment variables for the database (port 8000), and test access while adjusting network permissions; a solution is promised in the next tutorial.
Deploy the backend by configuring Cloud SQL connections on Google Cloud Platform, updating the database URL and host, building with Docker Compose, and testing the API with Postman.
Deploy the frontend with a multi-stage docker build and nginx, serve the built React app, and push to Google Cloud Registry for Cloud Run deployment; update localhost to the endpoint.
Welcome to The Complete React and Golang Course!
Want to build your own admin app? Master a new coding language? Or maybe just brush up on your coding skills? This 10-hour course will give you the skills you need to start your React and Go career!
In this course, you’ll quickly master the basics of Golang and GORM, and then move on to more advanced fare with a big practical project! By the end of the course you’ll have built:
Stand-alone admin app, with:
Admin dashboard
Daily sales chart
Ability to create, update and delete users
Ability to assign levels of user access
List products (with image, price and description)
Animate user orders
Deploy the app to Google Cloud
Created especially for Codestars students, The Complete React and Golang Course combines Antonio Papa’s original course (React and Golang: A Practical Guide) with nearly 2 hours of BRAND NEW material!
In Go you will learn:
Use the Fiber framework inspired by express.js
Create public and secure routes
Connect with MySQL
Run Migrations
Validate Requests
Generate Jwt Tokens
Use HttpOnly Cookies
Upload Images
Export CSV files
Use Docker environment variables
In React you will learn:
Create a React project with Typescript
Use Redux
Create public and private routes
React Animations
Upload Images
Export CSV's
Build a chart with c3.js (part of d3.js)
Perfect for beginners, or anyone new to Antonio’s courses (if you already know some Go and JavaScript that’s great, but it’s not required!) Antonio explains everything he does on screen… and if you ever get stuck, just post in the course Q&A forum and Antonio will reply asap!