accords-library.com/README.md

90 lines
3.1 KiB
Markdown
Raw Normal View History

2021-11-04 11:29:25 +00:00
# Accords-library.com
2022-01-02 17:06:47 +00:00
## Technologies
#### [Back](https://github.com/Accords-Library/strapi.accords-library.com)
2022-03-03 22:28:41 +00:00
2022-01-02 17:06:47 +00:00
- CMS: Stapi
- GraphQL endpoint
- Multilanguage support
- Markdown format for the rich text fields
2022-03-07 20:57:56 +00:00
#### [Image Processor](https://github.com/Accords-Library/img.accords-library.com)
2022-03-13 14:56:03 +00:00
2022-03-07 20:57:56 +00:00
- Convert the images from the CMS to 4 formats
- Small: 512x512, quality 60, .webp
- Medium: 1024x1024, quality 75, .webp
- Large: 2048x2048, quality 80, .webp
- Og: 512x512, quality 60, .jpg
2022-01-02 17:06:47 +00:00
#### [Front](https://github.com/Accords-Library/accords-library.com) (this repository)
2022-03-03 22:28:41 +00:00
2022-02-20 14:34:18 +00:00
- Language: [TypeScript](https://www.typescriptlang.org/)
2022-01-02 17:06:47 +00:00
- Queries: [GraphQL](https://graphql.org/)
- [GraphQL Code Generator](https://www.graphql-code-generator.com/) to automatically generated types for the operations variables and responses
2022-02-20 14:34:18 +00:00
- The operations are stored in a graphql file and then retrieved and wrap as an actual TypeScript function
2022-03-03 22:28:41 +00:00
- Markdown: [markdown-to-jsx](https://www.npmjs.com/package/markdown-to-jsx)
2022-02-20 14:34:18 +00:00
- Support for Arbitrary React Components and Component Props!
2022-01-02 17:06:47 +00:00
- Styling: [Tailwind CSS](https://tailwindcss.com/)
2022-02-20 14:34:18 +00:00
- Good typographic defaults using [Tailwind/Typography](https://tailwindcss.com/docs/typography-plugin)
2022-01-02 17:06:47 +00:00
- Beside the theme declaration no CSS outside of Tailwind CSS
- Manually added support for scrollbar styling
2022-02-24 01:10:20 +00:00
- Support for [Material Icons](https://fonts.google.com/icons)
- Support for light and dark mode with a manual switch and system's selected theme by default
- Support for creating any arbitrary theming mode by swapping CSS variables
2022-01-02 17:06:47 +00:00
- Framework: [Next.js](https://nextjs.org/) (React)
- Multilanguage support
- State Management: [React Context](https://reactjs.org/docs/context.html)
2022-03-03 22:28:41 +00:00
- Persistent app state using LocalStorage
2022-02-20 14:34:18 +00:00
- Support for many screen sizes and resolutions
2022-03-07 20:57:56 +00:00
- SSG (Static Site Generation):
- The website is built before running in production
- Performances are great, and possibility to deploy the app using a CDN
- OpenGraph and Metadata
- Good defaults for the metadate and OpenGraph properties
- Each page can provide the thumbnail, title, description to be used
2022-03-03 22:28:41 +00:00
- Data quality testing
- Data from the CMS is subject to a battery of tests (about 20 warning types and 40 error types) at build time
- Each warning/error comes with a front-end link to the incriminating element, as well as a link to the CMS to fix it.
- Check for completeness, conformity, and integrity
2022-02-25 14:57:09 +00:00
## Installation
```bash
git clone https://github.com/Accords-Library/accords-library.com.git
cd accords-library.com
npm install
```
Create a env file:
2022-03-03 22:28:41 +00:00
2022-02-25 14:57:09 +00:00
```bash
nano .env.local
```
Enter the followind information:
2022-03-03 22:28:41 +00:00
2022-02-25 14:57:09 +00:00
```txt
URL_GRAPHQL=https://url-to.strapi-accords-library.com/graphql
ACCESS_TOKEN=genatedcode-by-strapi-api
2022-03-23 15:19:23 +00:00
SMTP_HOST=email.provider.com
SMTP_USER=email@example.com
SMTP_PASSWORD=mypassword123
2022-02-25 14:57:09 +00:00
NEXT_PUBLIC_URL_CMS=https://url-to.strapi-accords-library.com/
NEXT_PUBLIC_URL_IMG=https://url-to.img-accords-library.com/
2022-03-03 22:28:41 +00:00
NEXT_PUBLIC_URL_SELF=https://url-to-front-accords-library.com
2022-02-25 14:57:09 +00:00
```
Run in dev mode:
2022-03-03 22:28:41 +00:00
2022-02-25 14:57:09 +00:00
```bash
./run_accords_dev.sh
```
OR build and run in production mode
2022-03-03 22:28:41 +00:00
2022-02-25 14:57:09 +00:00
```bash
./run_accords_build.sh
./run_accords_prod.sh
```