Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release #52

Merged
merged 59 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4ceabf5
chore: update packages
tosaken1116 Oct 14, 2023
f69fdcd
chore: tailwind css apply to storybook
tosaken1116 Oct 14, 2023
eaf03aa
feat: add typography UI
tosaken1116 Oct 14, 2023
98a48bb
Merge pull request #6 from tosaken1116/feat/typography-ui-#3
tosaken1116 Oct 14, 2023
4dcad2a
Bump @types/node from 20.8.4 to 20.8.6
dependabot[bot] Oct 14, 2023
d5e5fe0
feat: add button ui
tosaken1116 Oct 14, 2023
e9b3939
Merge pull request #5 from tosaken1116/dependabot/npm_and_yarn/develo…
tosaken1116 Oct 14, 2023
6319b6d
feat: add tailwind lint
tosaken1116 Oct 14, 2023
26c96c6
Merge pull request #7 from tosaken1116/feat/button-ui-#1
tosaken1116 Oct 14, 2023
40e1f5a
Merge pull request #9 from tosaken1116/feat/tailwind-lint-#8
tosaken1116 Oct 14, 2023
7ba52d8
chore(deps): bump next from 13.5.4 to 13.5.6
dependabot[bot] Oct 19, 2023
25ab901
chore(deps-dev): bump eslint-config-next from 13.5.4 to 13.5.6
dependabot[bot] Oct 19, 2023
4477e72
chore(deps-dev): bump lint-staged from 14.0.1 to 15.0.2
dependabot[bot] Oct 20, 2023
879839c
chore(deps-dev): bump @types/node from 20.8.6 to 20.8.8
dependabot[bot] Oct 24, 2023
413266b
feat: add shadcn ui
tosaken1116 Oct 24, 2023
1333036
feat: add popover component
tosaken1116 Oct 24, 2023
8272c9b
chore: merge from develop
tosaken1116 Oct 24, 2023
2fb78e2
fix: tailwind class order
tosaken1116 Oct 24, 2023
2cfab4c
Merge pull request #20 from tosaken1116/dependabot/npm_and_yarn/devel…
tosaken1116 Oct 24, 2023
56aa31f
Merge pull request #18 from tosaken1116/dependabot/npm_and_yarn/devel…
tosaken1116 Oct 24, 2023
3c55c77
Merge pull request #16 from tosaken1116/dependabot/npm_and_yarn/devel…
tosaken1116 Oct 24, 2023
4a12d8c
Merge pull request #13 from tosaken1116/dependabot/npm_and_yarn/devel…
tosaken1116 Oct 24, 2023
e222b02
Merge branch 'develop' into feat/popup-ui-#4
tosaken1116 Oct 24, 2023
263f6d1
Merge pull request #21 from tosaken1116/feat/popup-ui-#4
tosaken1116 Oct 24, 2023
70bc472
feat: change tailwind config
tosaken1116 Oct 24, 2023
bef2746
feat: add tab ui
tosaken1116 Oct 24, 2023
14b489d
Merge pull request #22 from tosaken1116/feat/tab-ui-#2
tosaken1116 Oct 24, 2023
3b7e31e
fix: disable tailwind custom class
tosaken1116 Oct 25, 2023
d0ac464
feat: button ui
tosaken1116 Oct 25, 2023
ca41878
Merge pull request #28 from tosaken1116/feat/button-ui-#3
tosaken1116 Oct 25, 2023
c29e41a
feat: add Avatar ui
tosaken1116 Oct 25, 2023
f929690
Merge pull request #31 from tosaken1116/feat/Avatar-ui-#29
tosaken1116 Oct 25, 2023
9fe3a26
feat: add tooltip ui
tosaken1116 Oct 25, 2023
b67f477
Merge pull request #32 from tosaken1116/feat/tooltip-ui-#30
tosaken1116 Oct 25, 2023
f0b584a
feat: add scroll area ui
tosaken1116 Oct 26, 2023
b9a3c90
chore: update lock file
tosaken1116 Oct 26, 2023
f7aadd1
Merge branch 'develop' into feat/scroll-area-ui-#33
tosaken1116 Oct 26, 2023
0c25a01
Merge pull request #37 from tosaken1116/feat/scroll-area-ui-#33
tosaken1116 Oct 26, 2023
f2ab37f
chore: add submodule
tosaken1116 Oct 26, 2023
e7ad504
chore: add openapi2aspida
tosaken1116 Oct 26, 2023
61330c0
chore: generate schema type
tosaken1116 Oct 27, 2023
81f7f3b
Merge pull request #42 from tosaken1116/feat/openapi-aspida-#39
tosaken1116 Oct 27, 2023
362a88c
feat: add datediff label ui
tosaken1116 Oct 28, 2023
ed5ca94
Merge pull request #46 from tosaken1116/feat/datediff-ui-#44
tosaken1116 Oct 28, 2023
703acc0
feat: add uis
tosaken1116 Oct 28, 2023
7e9f985
Merge pull request #47 from tosaken1116/feat/add-ui
tosaken1116 Oct 28, 2023
0f23d6e
chore: generate api type
tosaken1116 Oct 28, 2023
c896478
feat: api libs
tosaken1116 Oct 28, 2023
304e24c
Merge pull request #48 from tosaken1116/chore/gen-schema
tosaken1116 Oct 28, 2023
8d4ca28
feat: add Tweet Tool Buttons
tosaken1116 Oct 28, 2023
3f76f19
feat: add mediaContainer
tosaken1116 Oct 28, 2023
b8b5a12
feat: add Tweets model ui
tosaken1116 Oct 28, 2023
40b6a5f
Merge pull request #49 from tosaken1116/feat/Tweet-model
tosaken1116 Oct 28, 2023
39b30a4
feat: add sidebar model
tosaken1116 Oct 28, 2023
ea7f5d4
Merge pull request #50 from tosaken1116/feat/sidebar
tosaken1116 Oct 28, 2023
9944f0d
feat: add postTweet model
tosaken1116 Oct 29, 2023
f5b4d66
chore: some file update
tosaken1116 Oct 29, 2023
498994b
Merge pull request #53 from tosaken1116/feat/PostTweet-model
tosaken1116 Oct 29, 2023
82891e0
Merge branch 'main' into develop
tosaken1116 Oct 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NEXT_PUBLIC_BACKEND_URL=
ACCESS_KEY_ID=
SECRET_ACCESS_KEY=
REGION=
S3_BUCKET_NAME=
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ build/
_templates/
setup.js
*.config.*
src/apis
src/api/**/*
22 changes: 9 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,23 @@
"plugin:jsx-a11y/recommended",
"next/core-web-vitals",
"prettier",
"plugin:storybook/recommended"
"plugin:storybook/recommended",
"plugin:tailwindcss/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"react",
"import",
"unused-imports",
"jsx-a11y",
"@typescript-eslint",
"@tanstack/query"
],
"plugins": ["react", "import", "unused-imports", "jsx-a11y", "tailwindcss"],
"settings": {
"tailwindcss": {
"callees": ["cn"]
}
},
"rules": {
"@tanstack/query/exhaustive-deps": "error",
"@tanstack/query/prefer-query-object-syntax": "error",
"@tanstack/query/stable-query-client": "error",
// 関数の戻り値の型を明示的に指定する
"@typescript-eslint/explicit-function-return-type": "error",

"tailwindcss/no-custom-classname": "off",
// 必要な場合にのみアロー関数の本体を使用する
"arrow-body-style": ["error", "as-needed"],

Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "schemas"]
path = schemas
[submodule "schema"]
path = schema
url = [email protected]:tosaken1116/Somniosus_schema.git
2 changes: 1 addition & 1 deletion .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Preview } from '@storybook/react';

import '../src/app/globals.css';
const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@
"nextjs",
"precommit",
"tailwindcss"
],
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}
9 changes: 6 additions & 3 deletions aspida.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
input: 'src/apis/', // "input" of aspida is "output" for openapi2aspida
outputEachDir: true, // Generate $api.ts in each endpoint directory
openapi: { inputFile: './schemas/build/openapi.yml' },
input: 'api',
outputEachDir: true,
openapi: {
inputFile: './schema/build/openapi.yml',
outputDir: 'src/api',
},
};
Binary file modified bun.lockb
Binary file not shown.
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "app/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/libs/utils"
}
}
4 changes: 2 additions & 2 deletions cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// language - current active spelling language
"language": "en",
// words - list of words to be always considered correct
"words": ["autodocs"],
"ignorePaths": ["./src/apis"]
"words": ["aspida", "autodocs", "clsx"],
"ignorePaths": ["src/api/**/*"]
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
Expand Down
17 changes: 15 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
images: {
domains: ['avatars.githubusercontent.com'],
},
env: {
ACCESS_KEY_ID: process.env.ACCESS_KEY_ID,
SECRET_ACCESS_KEY: process.env.SECRET_ACCESS_KEY,
REGION: process.env.REGION,
S3_BUCKET_NAME: process.env.S3_BUCKET_NAME,
},
experimental: {
serverActions: true,
},
};

module.exports = nextConfig
module.exports = nextConfig;
36 changes: 30 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"prepare": "husky install",
"generate:type": "rm -r src/apis && openapi2aspida -c ./aspida.config.js",
"commitmsg": "commitlint -e $GIT_PARAMS",
"mock": "prism mock ./schema/build/openapi.yml",
"type": "openapi2aspida -c ./aspida.config.js --dotenv .env.local",
"fmt": "prettier --write 'src/**/*.{js,jsx,ts,tsx,json,css,scss}'",
"check:lint": "eslint 'src/**/*.{ts,tsx}' --report-unused-disable-directives --max-warnings 0",
"check:cspell": "cspell -c ./cspell.config.json \"./src/**/*\" --unique --no-progress --no-summary",
Expand All @@ -36,10 +38,27 @@
]
},
"dependencies": {
"@tanstack/react-query": "^4.36.1",
"next": "13.5.4",
"@aspida/fetch": "^1.14.0",
"@aws-sdk/client-s3": "^3.438.0",
"@aws-sdk/lib-storage": "^3.438.0",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-tooltip": "^1.0.7",
"@stoplight/prism-cli": "^5.5.0",
"@tanstack/react-query": "^5.0.5",
"aspida": "^1.14.0",
"date-fns": "^2.30.0",
"lucide-react": "^0.288.0",
"next": "13.5.6",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"react-error-boundary": "^4.0.11",
"react-icons": "^4.11.0"
},
"devDependencies": {
"@commitlint/cli": "^17.7.1",
Expand All @@ -63,33 +82,38 @@
"@testing-library/react": "^14.0.0",
"@tsconfig/strictest": "^2.0.1",
"@types/jest": "^29.5.4",
"@types/node": "20.8.4",
"@types/node": "20.8.8",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"autoprefixer": "^10.4.16",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cspell": "^7.3.2",
"eslint": "8.51.0",
"eslint-config-next": "13.5.4",
"eslint-config-next": "13.5.6",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-storybook": "^0.6.13",
"eslint-plugin-tailwindcss": "^3.13.0",
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
"hygen": "^6.2.11",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"lint-staged": "^14.0.1",
"lint-staged": "^15.0.2",
"markuplint": "^3.12.1",
"npm-run-all": "^4.1.5",
"openapi2aspida": "^0.23.2",
"postcss": "^8.4.31",
"prettier": "^3.0.1",
"storybook": "^7.2.2",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.3.3",
"tailwindcss-animate": "^1.0.7",
"ts-jest": "^29.1.1",
"typescript": "5.2.2"
},
Expand Down
1 change: 1 addition & 0 deletions schema
Submodule schema added at 2fc205
61 changes: 39 additions & 22 deletions src/apis/$api.ts → src/api/$api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { AspidaClient, BasicHeaders } from 'aspida';
import type { Methods as Methods_1vmdska } from './accounts/_id@string';
import type { Methods as Methods_17l7lnu } from './accounts/register';
import type { Methods as Methods_1nkw4za } from './accounts/register/password';
import type { Methods as Methods_66bvhy } from './accounts/update';
import type { Methods as Methods_12twjkf } from './follows/create/_id@string';
import type { Methods as Methods_1ot5dgu } from './follows/delete/_id@string';
Expand All @@ -14,14 +15,15 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
const prefix = (baseURL === undefined ? 'http://localhost:8000' : baseURL).replace(/\/$/, '');
const PATH0 = '/accounts';
const PATH1 = '/accounts/register';
const PATH2 = '/accounts/update';
const PATH3 = '/follows/create';
const PATH4 = '/follows/delete';
const PATH5 = '/likes/create';
const PATH6 = '/likes/delete';
const PATH7 = '/tweets/delete';
const PATH8 = '/tweets/get/timeline';
const PATH9 = '/tweets/post';
const PATH2 = '/accounts/register/password';
const PATH3 = '/accounts/update';
const PATH4 = '/follows/create';
const PATH5 = '/follows/delete';
const PATH6 = '/likes/create';
const PATH7 = '/likes/delete';
const PATH8 = '/tweets/delete';
const PATH9 = '/tweets/get/timeline';
const PATH10 = '/tweets/post';
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
Expand All @@ -47,6 +49,21 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
};
},
register: {
password: {
/**
* @param option.body - password to create
* @returns success
*/
post: (option: { body: Methods_1nkw4za['post']['reqBody'], config?: T | undefined }) =>
fetch<Methods_1nkw4za['post']['resBody'], BasicHeaders, Methods_1nkw4za['post']['status']>(prefix, PATH2, POST, option).json(),
/**
* @param option.body - password to create
* @returns success
*/
$post: (option: { body: Methods_1nkw4za['post']['reqBody'], config?: T | undefined }) =>
fetch<Methods_1nkw4za['post']['resBody'], BasicHeaders, Methods_1nkw4za['post']['status']>(prefix, PATH2, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH2}`,
},
/**
* @param option.body - account to create
* @returns success
Expand All @@ -67,20 +84,20 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
* @returns success
*/
put: (option: { body: Methods_66bvhy['put']['reqBody'], config?: T | undefined }) =>
fetch<Methods_66bvhy['put']['resBody'], BasicHeaders, Methods_66bvhy['put']['status']>(prefix, PATH2, PUT, option).json(),
fetch<Methods_66bvhy['put']['resBody'], BasicHeaders, Methods_66bvhy['put']['status']>(prefix, PATH3, PUT, option).json(),
/**
* @param option.body - account to update
* @returns success
*/
$put: (option: { body: Methods_66bvhy['put']['reqBody'], config?: T | undefined }) =>
fetch<Methods_66bvhy['put']['resBody'], BasicHeaders, Methods_66bvhy['put']['status']>(prefix, PATH2, PUT, option).json().then(r => r.body),
$path: () => `${prefix}${PATH2}`,
fetch<Methods_66bvhy['put']['resBody'], BasicHeaders, Methods_66bvhy['put']['status']>(prefix, PATH3, PUT, option).json().then(r => r.body),
$path: () => `${prefix}${PATH3}`,
},
},
follows: {
create: {
_id: (val2: string) => {
const prefix2 = `${PATH3}/${val2}`;
const prefix2 = `${PATH4}/${val2}`;

return {
/**
Expand All @@ -99,7 +116,7 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
},
delete: {
_id: (val2: string) => {
const prefix2 = `${PATH4}/${val2}`;
const prefix2 = `${PATH5}/${val2}`;

return {
/**
Expand All @@ -120,7 +137,7 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
likes: {
create: {
_id: (val2: string) => {
const prefix2 = `${PATH5}/${val2}`;
const prefix2 = `${PATH6}/${val2}`;

return {
/**
Expand All @@ -139,7 +156,7 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
},
delete: {
_id: (val2: string) => {
const prefix2 = `${PATH6}/${val2}`;
const prefix2 = `${PATH7}/${val2}`;

return {
/**
Expand All @@ -160,7 +177,7 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
tweets: {
delete: {
_id: (val2: string) => {
const prefix2 = `${PATH7}/${val2}`;
const prefix2 = `${PATH8}/${val2}`;

return {
/**
Expand All @@ -183,13 +200,13 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
* @returns success
*/
get: (option?: { config?: T | undefined } | undefined) =>
fetch<Methods_um4wq7['get']['resBody'], BasicHeaders, Methods_um4wq7['get']['status']>(prefix, PATH8, GET, option).json(),
fetch<Methods_um4wq7['get']['resBody'], BasicHeaders, Methods_um4wq7['get']['status']>(prefix, PATH9, GET, option).json(),
/**
* @returns success
*/
$get: (option?: { config?: T | undefined } | undefined) =>
fetch<Methods_um4wq7['get']['resBody'], BasicHeaders, Methods_um4wq7['get']['status']>(prefix, PATH8, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH8}`,
fetch<Methods_um4wq7['get']['resBody'], BasicHeaders, Methods_um4wq7['get']['status']>(prefix, PATH9, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH9}`,
},
},
post: {
Expand All @@ -198,14 +215,14 @@ const api = <T>({ baseURL, fetch }: AspidaClient<T>) => {
* @returns success
*/
post: (option: { body: Methods_hsfp97['post']['reqBody'], config?: T | undefined }) =>
fetch<Methods_hsfp97['post']['resBody'], BasicHeaders, Methods_hsfp97['post']['status']>(prefix, PATH9, POST, option).json(),
fetch<Methods_hsfp97['post']['resBody'], BasicHeaders, Methods_hsfp97['post']['status']>(prefix, PATH10, POST, option).json(),
/**
* @param option.body - tweet to delete
* @returns success
*/
$post: (option: { body: Methods_hsfp97['post']['reqBody'], config?: T | undefined }) =>
fetch<Methods_hsfp97['post']['resBody'], BasicHeaders, Methods_hsfp97['post']['status']>(prefix, PATH9, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH9}`,
fetch<Methods_hsfp97['post']['resBody'], BasicHeaders, Methods_hsfp97['post']['status']>(prefix, PATH10, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH10}`,
},
},
};
Expand Down
Loading
Loading