Autostrada
Autostrada
Create a new codebase Get Autostrada Plus
Documentation Changelog Roadmap Give feedback
Login

DocumentationTraditional web application › Getting started

Getting started

After you generate a codebase with Autostrada, you'll be shown 'how to run your application' instructions tailored to the specific options you chose. Please follow them to get your application up and running for the first time.

You can also find a copy of these tailored instructions in the README.md file in your codebase.

Once your application is up and running, you're encouraged to start exploring and familiarizing yourself with the codebase. Remember: Everything in the codebase is designed to be editable. Feel free to change and adapt it to meet your needs.

High-level project structure

The codebase contains three high-level directories:

In the cmd/web/main.go file you'll notice the definition of an application struct type. This type is central to the design of the application. The application struct contains all the dependencies that your application needs, and your handlers, helpers and middleware are all defined as methods on this type.

Where should I begin?

The most important files to familiarize yourself with are:

If you're pushed for time and don't want to read through all the Autostrada documentation, the most important things to look over are:

  1. Admin Makefile
  2. Creating handlers
  3. Injecting dependencies
  4. Configuration settings
  5. Error handling
  6. Sending HTML responses
  7. Working with HTML forms
  8. Working with SQL databases

And if you selected them as options:

  1. SQL migrations
  2. Basic auth
  3. Server-side sessions
  4. User accounts and authentication