svgl/README.md

109 lines
2.6 KiB
Markdown
Raw Normal View History

2022-03-04 21:34:58 +08:00
<p align="center">
2022-06-26 23:35:19 +08:00
<a href="https://svgl.vercel.app/" target="_blank">
<img src="https://i.postimg.cc/1tzrP2rg/banner-corner.png" width="800px" alt="SVGL Banner" />
2022-03-04 21:34:58 +08:00
</a>
</p>
2022-06-20 22:27:28 +08:00
## 📦 Packages:
- ⚡️ [Nextjs](https://nextjs.org/) - The React Framework for Production.
- ⚒️ [React 18](https://reactjs.org/) - A JavaScript library for building user interfaces.
- 💙 [Typescript](https://www.typescriptlang.org/) - A superset of JavaScript.
- ✅ [Vitest](https://vitest.dev/) - A blazing fast unit test framework.
2022-06-20 22:27:28 +08:00
- 💅 [Chakra UI](https://chakra-ui.com/) - Create accessible React apps with speed.
- 💥 [Framer Motion](https://www.framer.com/motion/) - Production-ready motion library.
2022-06-26 23:35:19 +08:00
- 💖 [Phosphor Icons](https://phosphoricons.com/) - A flexible icon family for everyone.
2022-06-21 00:26:46 +08:00
- ⬇️ [Next-PWA](https://github.com/shadowwalker/next-pwa) - Zero config PWA plugin for Next.js, with workbox.
2022-01-16 22:40:15 +08:00
2022-06-20 22:27:28 +08:00
## 🚀 Getting started:
2022-03-04 21:34:58 +08:00
2022-01-17 06:27:55 +08:00
You need:
2022-06-20 22:27:28 +08:00
- [Node.js 16+ (recommend: 16.15.1 LTS)](https://nodejs.org/en/)
2022-01-17 06:27:55 +08:00
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
2022-06-20 22:27:28 +08:00
1. Clone the repository:
```bash
git@github.com:pheralb/svgl.git
```
2. Install dependencies:
2022-01-16 22:40:15 +08:00
```bash
2022-01-17 06:27:55 +08:00
npm install
2022-06-20 22:27:28 +08:00
# or
yarn install
```
3. Run:
```bash
npm run dev
2022-06-20 22:27:28 +08:00
# or
yarn dev
2022-06-27 01:43:23 +08:00
```
4. Test & Build:
```bash
npm run ready
# or
yarn ready
2022-06-27 01:43:23 +08:00
```
Open [localhost:3000](localhost:3000) with your browser to see the result.
## 🤔 Can I add my logo?
Yes! Here is a guide for you 🥳:
1. [Fork the repository](https://github.com/pheralb/svgl/fork).
2. Clone the forked repository:
```bash
git@github.com:YOUR_USERNAME/svgl.git
```
3. Add the **.svg** logo here: [`/public/library`](https://github.com/pheralb/svgl/tree/main/public/library).
2022-07-21 05:16:02 +08:00
4. Add your logo information here following the structure: [`/data/svgs.json`](https://github.com/pheralb/svgl/blob/main/data/svgs.json).
2022-06-27 01:43:23 +08:00
```json
{
2022-06-28 20:15:46 +08:00
"id": 1,
2022-06-27 01:43:23 +08:00
"slug": "/library/your_logo.svg",
"title": "Logo Title",
"category": "Logo Category",
"url": "Your Website / app url"
}
```
5. Create a commit and push:
```bash
git add .
git commit -m "🥰 Added my logo"
git push origin main
```
2022-01-16 22:40:15 +08:00
2022-06-27 01:43:23 +08:00
6. Create a pull request with your changes and 🥳 ready.
2022-06-20 22:27:28 +08:00
2022-06-27 01:43:23 +08:00
## 🚂 Api endpoints:
```bash
2022-06-27 01:43:23 +08:00
- /api/all: returns all the logos.
- /api/search?id=2: returns the logo with id 2.
2022-06-27 01:43:23 +08:00
- /api/search?q=logo: returns the logo with query.
```
2022-06-20 22:27:28 +08:00
## ⚒️ Shortcuts:
- ⭐ SVG Library: [/public/library/](https://github.com/pheralb/svgl/tree/main/public/library).
- ✍️ SVG JSON logos: [/data/](https://github.com/pheralb/svgl/tree/main/data).
2022-01-16 22:40:15 +08:00
2022-03-04 21:34:58 +08:00
## 🔑 License:
2022-01-16 22:40:15 +08:00
2022-06-20 22:27:28 +08:00
- [MIT](https://github.com/pheralb/svgl/blob/main/LICENSE).