Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fxi committed Nov 13, 2024
1 parent be3a541 commit cd80522
Showing 1 changed file with 75 additions and 47 deletions.
122 changes: 75 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,96 @@
# Astro Starter Kit: Blog
# GRID STAT

```sh
npm create astro@latest -- --template blog
```
GRID STAT is a modern data visualization dashboard built with Astro and React, designed to display and analyze environmental and greenhouse gas (GHG) statistics.

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/blog)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/blog/devcontainer.json)
## πŸš€ Features

> πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun!
- **Interactive Dashboard**: Dynamic visualization of environmental indicators and GHG data
- **Multiple View Modes**: Switch between chart and table views for data analysis
- **Advanced Filtering**: Search and filter indicators by topics and keywords
- **Responsive Design**: Fully responsive layout with a clean, modern interface
- **Real-time Data**: Integration with UNEP GRID API for up-to-date environmental statistics

![blog](https://github.com/withastro/astro/assets/2244813/ff10799f-a816-4703-b967-c78997e8323d)
## πŸ› οΈ Tech Stack

Features:
- [Astro](https://astro.build) - Web framework for content-driven websites
- [React](https://reactjs.org) - UI component library
- [Tailwind CSS](https://tailwindcss.com) - Utility-first CSS framework
- [Recharts](https://recharts.org) - Composable charting library
- [TypeScript](https://www.typescriptlang.org) - Static typing for JavaScript
- [Lucide React](https://lucide.dev) - Beautiful & consistent icon system

- βœ… Minimal styling (make it your own!)
- βœ… 100/100 Lighthouse performance
- βœ… SEO-friendly with canonical URLs and OpenGraph data
- βœ… Sitemap support
- βœ… RSS Feed support
- βœ… Markdown & MDX support
## πŸ“¦ Installation

## πŸš€ Project Structure
1. Clone the repository:
```bash
git clone https://github.com/unep-grid/grid_stat
cd grid_stat
```

Inside of your Astro project, you'll see the following folders and files:
2. Install dependencies:
```bash
npm install
```

```text
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚Β Β  β”œβ”€β”€ components/
β”‚Β Β  β”œβ”€β”€ content/
β”‚Β Β  β”œβ”€β”€ layouts/
β”‚Β Β  └── pages/
β”œβ”€β”€ astro.config.mjs
β”œβ”€β”€ README.md
β”œβ”€β”€ package.json
└── tsconfig.json
3. Start the development server:
```bash
npm run dev
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
4. Build for production:
```bash
npm run build
```

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
5. Preview the production build:
```bash
npm run preview
```

The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more.
## πŸ—οΈ Project Structure

Any static assets, like images, can be placed in the `public/` directory.
```
.
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”œβ”€β”€ Navbar.astro
β”‚ β”‚ β”œβ”€β”€ dashboard/ # Main dashboard components
β”‚ β”‚ └── ui/ # Reusable UI components
β”‚ β”œβ”€β”€ data/ # Mock data and indicators
β”‚ β”œβ”€β”€ layouts/ # Astro layout templates
β”‚ β”œβ”€β”€ pages/ # Route pages
β”‚ └── styles/ # Global styles
β”œβ”€β”€ public/ # Static assets
β”œβ”€β”€ astro.config.mjs # Astro configuration
β”œβ”€β”€ tailwind.config.mjs # Tailwind CSS configuration
└── package.json
```

## πŸ”§ Configuration

## 🧞 Commands
The project uses Astro's configuration file (`astro.config.mjs`) with the following integrations:
- MDX support
- Sitemap generation
- React components
- Tailwind CSS (with custom configuration)

## πŸ“ API Integration

The dashboard integrates with the UNEP GRID API to fetch environmental indicators:
```typescript
const response = await fetch('https://api.unepgrid.ch/stats/v1/indicators?language=eq.en');
```

All commands are run from the root of the project, from a terminal:
## 🀝 Contributing

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
Contributions are welcome! Please feel free to submit a Pull Request.

## πŸ‘€ Want to learn more?
## πŸ“„ License

Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
[Add your license information here]

## Credit
## πŸ™ Acknowledgments

This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).
- UNEP GRID for providing the environmental data API
- The Astro team for the excellent web framework
- All contributors to this project

0 comments on commit cd80522

Please sign in to comment.