# Issue with codebase

**URL:** <https://community.grafana.com/t/issue-with-codebase/327>\
**Category:** General\
**Created:** [March 29, 2017, 10:02am UTC](https://community.grafana.com/t/issue-with-codebase/327 "2017-03-29T10:02:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashuna](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@ashuna](https://community.grafana.com/u/ashuna)\
**Post date:** [March 29, 2017, 10:02am UTC](https://community.grafana.com/t/issue-with-codebase/327/1 "2017-03-29T10:02:54Z")

</div>

Hi. I have an issue with the codebase.

Util now, here are the things that I know and uncertain about Grafana:

- Use Golang for the backend (Is go totally about the business logic and encapsulating the HTTP API? )
- AngularJS for the frontend
- Does Grafana have its own database except InfluxDB and so on?
- Use nginx as a reverse proxy and NodeJS as a web server?
- I want to know that is there any data flow diagram to help me have a better understanding.

Thanks ^^

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [March 29, 2017, 10:33am UTC](https://community.grafana.com/t/issue-with-codebase/327/2 "2017-03-29T10:33:44Z")

</div>

- Grafana uses Golang for the backend and the [web framework Macaron](https://github.com/go-macaron/macaron).
- Grafana uses AngularJS with TypeScript (with some JS too) and SASS for the frontend.
- Grafana ships with Sqlite for Grafana data (dashboards, users, orgs etc.) but [can also use mysql or postgres].([http://docs.grafana.org/installation/configuration/#database](http://docs.grafana.org/installation/configuration/#database))
- Grafana does not have to be behind an Nginx reverse proxy. Does not use NodeJS as a webserver.

Try the [Building from Source](http://docs.grafana.org/project/building_from_source/) instructions to get started with the code. Golang code is in the pkg directory and frontend code is in the public directory.

---

<div class="post-metadata">

**Author:** ![ashuna](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@ashuna](https://community.grafana.com/u/ashuna)\
**Post date:** [March 30, 2017, 3:05am UTC](https://community.grafana.com/t/issue-with-codebase/327/3 "2017-03-30T03:05:44Z")

</div>

Thanks for your reply. But i still hava some questions.

So there is no web server. Just use Golang for the backend server. Why does Grafana choose NodeJS and what role does it play? Write json http clients in?

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [March 30, 2017, 10:28am UTC](https://community.grafana.com/t/issue-with-codebase/327/4 "2017-03-30T10:28:13Z")

</div>

Macaron builds on the [Go http server implementation](https://golang.org/pkg/net/http/) so it is the web server. Go Http is very bare bones so Macaron is a layer of middleware above it. It is a little similar to Express in NodeJS or Sinatra in Ruby.

NodeJS is for build time dependencies - npm, grunt etc.

Are you planning on writing a Pull Request or a plugin? Or are you researching Grafanas’ dependencies before you start using it in production?

---

<div class="post-metadata">

**Author:** ![ashuna](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@ashuna](https://community.grafana.com/u/ashuna)\
**Post date:** [March 31, 2017, 2:37am UTC](https://community.grafana.com/t/issue-with-codebase/327/5 "2017-03-31T02:37:16Z")

</div>

I am studying Grafana for my graduation thesis .I have used Grafana and its awesome! For the first, I want to figure out how the frontend and the backend work. Writing a plugin is also planned.  
As you know, the code is very large and it is really difficult for me. Anyway, your reply is is quite helpful to me. 😃

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [April 4, 2017, 10:09am UTC](https://community.grafana.com/t/issue-with-codebase/327/6 "2017-04-04T10:09:16Z")

</div>

Depending on what sort of plugin you are writing you might need to know that much about the Grafana internals. Most plugins are frontend plugins (even the data sources). Data sources need a backend component if you want to provide alerting.

To get started on plugins, there is some documentation [here](http://docs.grafana.org/plugins/developing/development/).

---

<div class="post-metadata">

**Author:** ![anon80964540](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anon80964540](https://community.grafana.com/u/anon80964540)\
**Post date:** [January 13, 2021, 4:40pm UTC](https://community.grafana.com/t/issue-with-codebase/327/7 "2021-01-13T16:40:15Z")

</div>

Closed on January 13, 2021, 4:40pm UTC


