-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit: created project based on scaffold
- Loading branch information
0 parents
commit 011956a
Showing
176 changed files
with
37,224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{js,json,yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.yarn/** linguist-vendored | ||
/.yarn/releases/* binary | ||
/.yarn/plugins/**/* binary | ||
/.pnp.* binary linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
.pnp.* | ||
|
||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const tailwindPlugin = require('prettier-plugin-tailwindcss'); | ||
|
||
const config = { | ||
semi: true, | ||
tabWidth: 2, | ||
printWidth: 100, | ||
singleQuote: true, | ||
plugins: [tailwindPlugin], | ||
}; | ||
|
||
module.exports = config; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
yarnPath: .yarn/releases/yarn-3.6.0.cjs | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM node:18-alpine | ||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
RUN apk add --no-cache libc6-compat | ||
ENV NODE_ENV development | ||
|
||
WORKDIR /app | ||
COPY .yarn ./.yarn | ||
COPY package.json .yarnrc.yml yarn.lock ./ | ||
|
||
WORKDIR /app/client | ||
COPY ./client/package.json ./ | ||
RUN yarn install | ||
|
||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
COPY ./client . | ||
RUN chown -R node:node /app/client | ||
USER node | ||
|
||
EXPOSE 3000 | ||
ENV PORT 3000 | ||
|
||
CMD ["yarn", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM node:18-alpine | ||
# Installing libvips-dev for sharp Compatibility | ||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev | ||
ENV NODE_ENV=development | ||
|
||
WORKDIR /app/ | ||
COPY .yarn ./.yarn | ||
COPY package.json .yarnrc.yml yarn.lock ./ | ||
|
||
WORKDIR /app/cms | ||
COPY ./cms/package.json ./ | ||
RUN yarn install | ||
|
||
ENV PATH /app/node_modules/.bin:$PATH | ||
|
||
COPY ./cms . | ||
RUN chown -R node:node /app/cms | ||
USER node | ||
RUN ["yarn", "build"] | ||
EXPOSE 1337 | ||
CMD ["yarn", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Vizzuality | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# AFOCO | ||
|
||
Description on progress... | ||
|
||
## Usage | ||
|
||
### Client | ||
|
||
Start the client with: | ||
|
||
```bash | ||
yarn client dev | ||
``` | ||
|
||
### Server CMS | ||
|
||
Start the server with: | ||
|
||
```bash | ||
yarn cms dev | ||
``` | ||
|
||
### Types for API | ||
|
||
To generate the types for the API, run: | ||
|
||
```bash | ||
yarn types build | ||
``` | ||
|
||
## Usage with Docker (recommended) | ||
|
||
To run the app with docker, run: | ||
|
||
```bash | ||
docker-compose up --build | ||
``` | ||
|
||
Open the app in http://localhost:3000 for the client and http://localhost:1337 for the CMS. | ||
|
||
NOTE: Docker is recommended for development, but not for production (yet). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# defaults means > 0.5%, last 2 versions, Firefox ESR, not dead | ||
defaults | ||
not IE 11 | ||
maintained node versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Public url. Canonical url of the project. | ||
NEXT_PUBLIC_URL=http://localhost:3000 | ||
|
||
# API Url. | ||
# Development, Preview, Production | ||
# Depending on the environment we will use different urls. It can be the same for the storybook and for the project. | ||
NEXT_PUBLIC_API_URL=https://api-url.com | ||
|
||
# Mapbox token | ||
# Development, Preview, Production | ||
# corresponding to the account used for this project. It can be the same for the storybook and for the project. | ||
NEXT_PUBLIC_MAPBOX_API_TOKEN= | ||
|
||
# Google Analytics tracking ID. | ||
# Development, Preview, Production | ||
# If you're working with an Google Analytics 4 property, you have a Measurement ID instead of a Tracking ID. | ||
NEXT_PUBLIC_GA_TRACKING_ID=UA-000000-2 | ||
|
||
# Recoil: Remove warnings about duplicate atoms due to hot-reloading | ||
# Development | ||
RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.next | ||
/node_modules | ||
/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"next/core-web-vitals" | ||
], | ||
"ignorePatterns": [ | ||
"src/types/generated/*" | ||
], | ||
"rules": { | ||
"no-console": [1, { "allow": ["info", "error", "debug"] }], | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": ["builtin", "external", "internal", "parent", "sibling"], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
}, | ||
"pathGroups": [ | ||
{ | ||
"pattern": "react", | ||
"group": "builtin", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "react**", | ||
"group": "builtin" | ||
}, | ||
{ | ||
"pattern": "@react**", | ||
"group": "builtin" | ||
}, | ||
{ | ||
"pattern": "next/**", | ||
"group": "builtin", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "node_modules/**", | ||
"group": "builtin" | ||
}, | ||
{ | ||
"pattern": "@/env.mjs", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/lib/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/data/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/store", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/store/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/types/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/app/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/hooks/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/constants/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/containers/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/components/**", | ||
"group": "internal" | ||
}, | ||
{ | ||
"pattern": "@/services/**", | ||
"group": "internal", | ||
"position": "after" | ||
} | ||
], | ||
"pathGroupsExcludedImportTypes": ["react"] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
|
||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
.pnp.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "default", | ||
"rsc": true, | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/styles/globals.css", | ||
"baseColor": "slate", | ||
"cssVariables": true | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/classnames" | ||
} | ||
} |
Oops, something went wrong.