Project Structure Explained
Tour the files the CLI generates.
Project Structure Explained is a free Angular Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Angular Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
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.
Frequently asked questions
Is the “Project Structure Explained” lesson free?
Yes — the full text of “Project Structure Explained” is free to read here on the web, and the Angular Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Angular Academy course, upgrade to CoddyKit PRO.
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; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
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
- Generating a New Project
- Project Structure Explained
- Generating Code with ng generate
- Building and Serving