---
title: Project Structure
description: An overview of the SherpaJS project structure 
---

# Project Structure
An overview of the SherpaJS project structure.


<br/>


## Top-level Directories
Top-level directories are used to organize endpoints and static files.
|   |   |
|---|---|
| [`routes`](/build/routes) | Endpoint routes |
| [`public`](/build/static-assets) | Static assets, *optional only if you want to server public assets* |


<br/>


## Top-level Files
Top-level files are used to configure SherpaJS and manage the environment.
|   |   |
|---|---|
| [`sherpa.server.ts`](/build/server-config) | SherpaJS server config |
| [`sherpa.module.ts`](/build/module-config) | SherpaJS module config, *optional only if creating a module* |
| [`.env`](/build/miscellaneous#environment-variables) | Environment Varibles File |



<br/>


## Routing Conventions
The naming conventions for inside the `routes` directory, allows you to define
routes usings segments and different types of endpoints. View and functions
endpoints may persist together, but no other files should be present in your
`routes` directory.

|   |   |   |
|---|---|---|
| [`index`](/build/endpoints#function-endpoints) | `.ts` `.js` | Functions endpoint |
| [`module`](/build/endpoints#module-endpoints)  | `.ts` `.js` | Module endpoint |
| [`view`](/build/endpoints#view-endpoints)      | `.html`     | View endpoint |
| [`/folder_name`](/build/routes#regular-route)  |             | Regular route segment, *any folder_name* |
| [`/[param_name]`](/build/routes#dynamic-route) |             | Dynamic route segment, *any param_name* |
