Angular Academy · Lesson

Project Structure Explained

Tour the files the CLI generates.

Lesson 2 of 413 steps

Project Structure Explained is a free Angular Academy lesson on CoddyKit. This is lesson 2 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the Angular Academy learning path, and your progress syncs across the web and the CoddyKit app. The Angular Academy course includes 4 lessons in total.

Project Structure Explained

An Angular workspace has a predictable layout. Knowing the key files and folders helps you navigate any project.

The src Folder

The src/ folder holds your application source code: the entry point, the app code, and global assets like index.html and styles.

main.ts

src/main.ts is the application entry point. It bootstraps the root component with bootstrapApplication.

import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { AppComponent } from './app/app.component';

bootstrapApplication(AppComponent, appConfig);

index.html

src/index.html is the single HTML page. Its body contains your root component selector, where Angular renders the app.

<!-- inside body -->
<!-- <app-root></app-root> -->

The app Folder

src/app/ holds your components, services, routes, and configuration. A new project includes app.component, app.config.ts, and app.routes.ts.

app.component Files

The root component usually has a .ts class, an .html template, and a .css (or .scss) stylesheet, plus a .spec.ts test file.

app.config.ts

app.config.ts exports an ApplicationConfig with the providers array used at bootstrap, such as the router and HTTP client.

app.routes.ts

app.routes.ts exports the route definitions array consumed by provideRouter.

import { Routes } from '@angular/router';

export const routes: Routes = [];

angular.json

At the workspace root, angular.json configures the CLI: build targets, output paths, assets, styles, and serve options for each project.

package.json and tsconfig

package.json lists dependencies and npm scripts. tsconfig.json files configure the TypeScript compiler for the app and tests.

public or assets

Static files (images, fonts, favicon) live in a public or assets folder and are copied to the build output as configured in angular.json.

Quick Check: Structure

Identify the entry point.

Recap: Structure

You explored the workspace: src/ for source, main.ts as the entry point, index.html as the host page, app/ for components and config, and angular.json for CLI configuration. Next: generating code with the CLI.

Free to start

Learn HTML with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
38
Lessons
144

Frequently Asked Questions

Is the “Project Structure Explained” lesson free?

Yes — any 3 lessons of the Angular Academy learning path, including “Project Structure Explained”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The Angular Academy course includes 4 lessons in total.

What will I learn in “Project Structure Explained”?

Tour the files the CLI generates. You practise Angular Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Angular Academy?

No prior experience is required. Angular Academy on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 2 of 4.

How long does the “Project Structure Explained” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Angular Academy lesson?

Yes. Every Angular Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Generating a New Project
  2. Project Structure Explained
  3. Generating Code with ng generate
  4. Building and Serving
← Back to Angular Academy