> For the complete documentation index, see [llms.txt](https://gurita-alexandru.gitbook.io/cloud-computing-2023-simpre/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gurita-alexandru.gitbook.io/cloud-computing-2023-simpre/seminar-1/set-up-nextjs-project.md).

# Set-up NextJS project

## 1. Git Repository

* Creați un **repository public nou** în GitHub ( !bifați optiunea **Add a README file** și selectați **Add .gitignore template - Node** )
* Copiați link-ul de clonare al repository-ului și rulați din terminal (eu folosesc git bash - vine la pachet cand instalati git) comanda **git clone** într-un folder local cu respectivul link

![](/files/E2aTkX6OomSTg53FI256)

![](/files/L4mEgC0J2xfAVeSBZqie)

## 2. Inițializare proiect NextJS

{% hint style="info" %}
Pentru comanda **npx create-next-app\@latest** folositi Terminalul windows (click dreapta in folderul curent -> Open in Terminal). Vom folosi acel terminal pentru ca respectiva comanda declanseaza un proces interactiv care nu functioneaza mereu in Git Bash
{% endhint %}

* Deschideti terminalul Windows in directorul proiectului
* Rulati comanda: **npx create-next-app\@latest** si alegeti urmatoarele optiuni

<figure><img src="/files/On2wdVFVavr2ypYJCPK1" alt=""><figcaption></figcaption></figure>

* Un project NextJS va fi creat intr-un director nou. Pentru a evita confuziile, mutati totul din directorul nou creat in directorul in care ati initializat un repository de git.
* Deschideti proiectul nou creat intr-un editor
* Din orice terminal, <mark style="color:red;">fiind in directorul proiectului</mark>, rulati **npm run dev**. Proiectul ar trebui sa porneasca pe portul 3000.
* Accesati <http://localhost:3000/> - ar trebui sa vedeti aceasta pagina

<figure><img src="/files/gwBTWYdLCiES8k89HB4R" alt=""><figcaption></figcaption></figure>

* Felicitari, avem un proiect NextJS functional. Vom trimite codul in git si ne vom intoarce la el mai tarziu.
* Pentru a trimite codul în repository-ul remote, rulați **git add .** , **git commit -m "Initial setup"** , **git push origin \[numele branch-ului]** in terminal. Pentru mai multe detalii despre Git - <https://education.github.com/git-cheat-sheet-education.pdf>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gurita-alexandru.gitbook.io/cloud-computing-2023-simpre/seminar-1/set-up-nextjs-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
