Skip to content

AVAnnotate/admin-client

Repository files navigation

AVAnnotate Admin Client

This repository contains the code for the admin backend that powers AVAnnotate sites. It is made with the Astro framework, with a backend powered entirely by GitHub. It also uses React for client-side components.

Local Development

If you have access to the project on Netlify, install the Netlify CLI with npm install -g netlify-cli, then run netlify link in the project root to link your local repo to the desired Netlify project (for most local development this should probably be the staging instance). Once that link is done you can start a local server with netlify dev. In this case you don't need to worry about maintaining a local .env file for environment variables, since Netlify will inject them.

You can also run a local environment without linking to Netlify by running npm run dev. In this case you'll need a local .env file; copy the contents of .env.example and fill in the client ID and secret for the GitHub application you're using for authentication. (Values for these secrets can be copied from the Netlify projects, under Project Configuration -> Environment Variables.)

Note that running the site locally still requires authentication via GitHub, and changes made to projects will be applied, so be sure to create testing projects for playing around with any new and untested features.

Astro Basics

npm create astro@latest -- --template basics

Open in StackBlitz Open with CodeSandbox Open in GitHub Codespaces

🧑‍🚀 Seasoned astronaut? Delete this file. Have fun!

just-the-basics

🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
├── public/
│   └── favicon.svg
├── src/
│   ├── components/
│   │   └── Card.astro
│   ├── layouts/
│   │   └── Layout.astro
│   └── pages/
│       └── index.astro
└── package.json

Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the public/ directory.

🧞 Commands

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

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

👀 Want to learn more?

Feel free to check our documentation or jump into our Discord server.

About

Application for building AVAnnotate websites

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •