# [WIP] Draft User Experience for Func Base Templates
| Term | Definition |
| ---- | ---------- |
| Base Template | Default templates provided with func binaries|
## Top-Level Guidelines
1. Only 2 base templates per runtime (cloudevents + http)
1. All base templates should offer the same user experience, regardless of runtime.
1. All code, everywhere, should be commented (yaml is code).
1. All base templates should contain a README with some description of the files within the base template and some guidance about next steps.
## Epics + Acceptance Criteria
### Epic #1: Functionality for Base Template (no file inspection)
:sunglasses: Confidence: 5/5
> When the base template is built and run, it should provide instructions on how to ping the running function
```
GIVEN I create my function using func create
AND I build my function using func build
WHEN I do func run
THEN the running function should give me instructions on how to ping it
```
:::spoiler Sample Language
>Your function is currently deployed in {platform} i.e. Docker
It can be reached at {location}
You can ping your function by doing {instruction}
^^^ Any of the language above which is dynamically generated ought to be green text.
:::
---
:sunglasses: Confidence: 5/5
> When the base template is built and run, and the user pings the function, it should provide the user instructions on how to alter its output
```
GIVEN I have run a function which is built off of the base template
WHEN I ping the function using the instructions provided
THEN the function says "Hello World"
AND THEN the function gives me some instructions \
on how to change who the function says hello to
```
:::spoiler Sample Language
>Hello World! You can change who I say hello to by running {command} and changing "world" to the text of your choice
:::
---
### Epic #2: End-User File Inspection
> The first method in the template ought to be the request handler (i.e. when i do `func run` and ping the function, this is the method which gets pinged)
```
GIVEN I create my function using func create
AND GIVEN I choose any provided runtime
WHEN I inspect the main file (i.e. index.js, handle.go, func.py)
THEN I see the first method is the handler
```
> The first method in the template should have comments which explain what the method does.
```
GIVEN I have opened the main file in the base template (i.e. index.js, handle.go, func.py)
WHEN I inspect the first method
THEN I see the comments which explain what the method is expecting and what it will return when pinged
```
>The first method in the template should clearly show where the user will insert their code.
```
GIVEN I create my function using func create
WHEN I choose any provided runtime/language
THEN first method in my template is where I write my code
AND I see comments in the method decalaring "YOUR CODE GOES HERE"
```
```
GIVEN I create my function using func create for HTTP template
WHEN I chose any provided runtime/language
THEN I see second method as handling HTTP Get request
AND I see comments indicating the same
```
```
GIVEN I create my function using func create for HTTP template
WHEN I chose any provided runtime/language
THEN I see third method as handling HTTP Post request
AND I see comments indicating the same
```
1. The response from `func build` + `func run` should be the same across base templates, regardless of runtime.
### Examples