Skip to content

Commit

Permalink
MyArtverse-Project#27 Nuxt 3 Rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroji-fusky authored Apr 14, 2023
2 parents b971537 + 25dc764 commit fd938e6
Show file tree
Hide file tree
Showing 151 changed files with 5,922 additions and 7,505 deletions.
11 changes: 0 additions & 11 deletions .env.local.example

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/dependabot.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/lint-and-ts-check.yml

This file was deleted.

58 changes: 2 additions & 56 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,57 +1,3 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
/.pnp
.pnp.js

*/dist
*/.env

# testing
/coverage

# next.js
.next
*/out/

# production
*/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log
yarn-debug.log
yarn-error.log
.pnpm-debug.log

# local env files
.env*.local

# vercel
*/.vercel

# Default ignored files from .idea
.idea/shelf/
.idea/workspace.xml

# Editor-based HTTP Client requests
.idea/httpRequests/

# PWA files
service-worker.js
workbox-*.js

/sw.js
/sw.js.map
/workbox-*.js.map
/worker-*.js
/worker-*.js.map

.vercel

# tsc
*.tsbuildinfo
*.log*
.turbo
7 changes: 0 additions & 7 deletions .idea/discord.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/frontend.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/prettier.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
shamefully-hoist=true
strict-peer-dependencies=false
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
**/.next/**
**/_next/**
.nuxt
.output
dist
15 changes: 5 additions & 10 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"tabWidth": 2,
"useTabs": false,
"insertSpaces": true,
"cursorStyle": "line",
"lineNumbers": true,
"folding": true,
"matchBrackets": true,
"trailingComma": "none",
"semi": false
}
"semi": false,
"useTabs": true,
"printWidth": 80,
"arrowParens": "always"
}
8 changes: 0 additions & 8 deletions @types/app.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion @types/index.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ yarn dev:web

## License

MIT
MIT
4 changes: 4 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.env
prisma/migrations
30 changes: 30 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# MyFursona API

This API is for MyFursona, a place where users can store information and artworks of their fursona!

## Tech Stack

[![Tech Stack](https://skillicons.dev/icons?i=ts,nodejs,graphql,prisma,postgres,apollo)](https://skillicons.dev)

## Pre-requisites

- Postgres 16+
- Node 16+
- NPM (Yarn Preferred)

## How to run this project?

```bash
# Clone this repository
$ git clone https://github.com/MyFursona-Project/API
$ cd API
# Install dependencies
$ yarn
# Create a .env file and change the data
# Run the app
$ yarn dev
```

## Need help?

Contact us via email! [[email protected]](mailto:[email protected]) and feel free to ask your questions there!
38 changes: 38 additions & 0 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "@myfursona/api",
"private": true,
"version": "0.1.0",
"description": "MyFursona API Written in Typescript",
"main": "dist/index.js",
"repository": "https://github.com/MyFursona-Project/API.git",
"author": "Jason Diaz Jimenez <[email protected]>",
"license": "MIT",
"dependencies": {
"apollo-server-express": "^3.11.1",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"graphql": "^15.3.0",
"jsonwebtoken": "^9.0.0",
"prisma": "^4.8.0",
"reflect-metadata": "^0.1.13",
"type-graphql": "^1.1.1",
"typescript": "^4.9.4"
},
"devDependencies": {
"@prisma/client": "^4.8.0",
"@types/bcrypt": "^5.0.0",
"@types/bcryptjs": "^2.4.2",
"@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.15",
"@types/jsonwebtoken": "^9.0.0",
"@types/node": "^18.11.18"
},
"scripts": {
"start": "node .",
"dev": "yarn clean && yarn build && yarn start",
"build": "tsc",
"clean": "rm -rf dist"
}
}
57 changes: 57 additions & 0 deletions api/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model Fursona {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String @db.VarChar(255)
species String
colors String[]
biography String? @default("I do not have a biography set at this time") @db.VarChar(2000)
sexuality String? @default("None") @db.VarChar(100)
gender String? @default("None") @db.VarChar(100)
owner Profile @relation(fields: [ownerId], references: [id])
ownerId Int
artworks Artwork[]
}

model Profile {
id Int @id @default(autoincrement())
biography String? @default("I have not created a bio")
fursonas Fursona[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
artwork Artwork[]
username String @unique
likes Int @default(0)
status String? @default("No Status")
email String @unique
password String @unique @default(cuid())
age Int
}

model Flags {
flagName String
flagImage String
flagID Int @id @default(autoincrement())
}

model Artwork {
artworkID Int @id @default(autoincrement())
artist String
nsfw Boolean @default(false)
fursona Fursona @relation(fields: [fursonaId], references: [id])
fursonaId Int
owner Profile @relation(fields: [ownerId], references: [id])
ownerId Int
}
7 changes: 7 additions & 0 deletions api/src/context/Context.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Request, Response } from "express"

export interface Context {
req: Request
res: Response
payload?: { userId: number }
}
Loading

0 comments on commit fd938e6

Please sign in to comment.