Skip to content

Commit

Permalink
feat: separate api into a separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-droid committed Jul 12, 2022
1 parent 57fdd43 commit 6e2c9e6
Show file tree
Hide file tree
Showing 50 changed files with 332 additions and 8,980 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ README.md
.git
**/.turbo
**/dist
**/generated
7 changes: 6 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ updates:
directory: "/packages/eslint-config-animeflix"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/packages/tsconfig"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/packages/api"
schedule:
interval: "daily"
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ eslint:
- "packages/eslint-config-animeflix/**/*"
tsconfig:
- "packages/tsconfig/**/*"
api:
- "packages/api/**/*"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ frontend/public/sw.js
frontend/public/workbox-*.js
frontend/public/*.js.map

# generated
generated/
dist/

# turbo
.turbo/

Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
"command": "yarn dev"
},
{
"name": "Next.js: debug client-side",
Expand All @@ -17,7 +17,7 @@
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"command": "yarn dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
Expand Down
10 changes: 1 addition & 9 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@
"scripts": {
"dev": "next dev",
"lint": "next lint",
"generate": "graphql-codegen",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@animeflix/api": "*",
"@badrap/bar-of-progress": "^0.2.1",
"@heroicons/react": "^1.0.6",
"@reduxjs/toolkit": "^1.8.2",
"@vime/core": "^5.3.0",
"@vime/react": "^5.3.0",
"gogoanime-api": "github:riimuru/gogoanime",
"graphql": "^16.5.0",
"graphql-request": "^4.3.0",
"graphql-tag": "^2.12.6",
"next": "latest",
"next-pwa": "^5.5.4",
"next-seo": "^5.4.0",
Expand All @@ -35,10 +31,6 @@
},
"devDependencies": {
"@animeflix/tsconfig": "*",
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/typescript": "^2.4.11",
"@graphql-codegen/typescript-graphql-request": "^4.4.10",
"@graphql-codegen/typescript-operations": "^2.4.2",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/line-clamp": "^0.4.0",
"@types/node": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/anime/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import Image from 'next/image';
import Link from 'next/link';
import { useRouter } from 'next/router';

import { AnimeBannerFragment } from '@animeflix/api/aniList';
import { ClockIcon, ThumbUpIcon } from '@heroicons/react/outline';
import { PlayIcon } from '@heroicons/react/solid';

import Genre from '@components/Genre';
import Icon from '@components/Icon';
import progressBar from '@components/Progress';
import { AnimeBannerFragment } from '@generated/aniList';
import { stripHtml } from '@utility/utils';

export interface BannerProps {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/anime/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Image from 'next/image';
import Link from 'next/link';

import { AnimeInfoFragment } from '@animeflix/api/aniList';
import { ClockIcon, ThumbUpIcon } from '@heroicons/react/outline';
import { PlayIcon } from '@heroicons/react/solid';

import Icon from '@components/Icon';
import { AnimeInfoFragment } from '@generated/aniList';
import { base64SolidImage } from '@utility/image';

export interface CardProps {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/anime/Episode.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Image from 'next/image';
import Link from 'next/link';

import { AnimeBannerFragment, AnimeInfoFragment } from '@generated/aniList';
import { EpisodeInfoFragment } from '@generated/kitsu';
import { AnimeBannerFragment, AnimeInfoFragment } from '@animeflix/api/aniList';
import { EpisodeInfoFragment } from '@animeflix/api/kitsu';

export interface CardProps {
anime: AnimeBannerFragment & AnimeInfoFragment;
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/anime/EpisodeSection.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useRef } from 'react';

import { AnimeBannerFragment } from '@animeflix/api/aniList';
import { EpisodesListFragment } from '@animeflix/api/kitsu';

import EpisodeCard from '@components/anime/Episode';
import { AnimeBannerFragment } from '@generated/aniList';
import { EpisodesListFragment } from '@generated/kitsu';

export interface SectionProps {
anime: AnimeBannerFragment;
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/anime/Section.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { useRef } from 'react';

import { AnimeInfoFragment } from '@animeflix/api/aniList';

import AnimeCard from '@components/anime/Card';
import { AnimeInfoFragment } from '@generated/aniList';

export interface SectionProps {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/watch/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React from 'react';
import Image from 'next/image';
import Link from 'next/link';

import { AnimeBannerFragment, AnimeInfoFragment } from '@animeflix/api/aniList';
import { ClockIcon, ThumbUpIcon } from '@heroicons/react/outline';
import { PlayIcon } from '@heroicons/react/solid';

import Icon from '@components/Icon';
import { AnimeBannerFragment, AnimeInfoFragment } from '@generated/aniList';
import { base64SolidImage } from '@utility/image';

export interface CardProps {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const proxyFreeUrls = /(gogocdn\.stream)|(manifest\.prod\.boltdns\.net)/;
Loading

0 comments on commit 6e2c9e6

Please sign in to comment.