Skip to content

Commit

Permalink
codac quasseln setup (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loukass23 authored Jun 14, 2023
1 parent 86da9ba commit a1f2086
Show file tree
Hide file tree
Showing 48 changed files with 2,470 additions and 36,189 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ storybook-static/
*.js
node_modules/
packages/codac-graphql-types/tsup.config.ts
packages/eslint-config-custom/index.js
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
"files.associations": {
"*.css": "tailwindcss"
},
"jest.autoRun": "off",
"jest.disabledWorkspaceFolders": [],
"jest.jestCommandLine": "npm test",
"jestrunner.jestCommand": "npm test",
"eslint.workingDirectories": [
{
"pattern": "apps/*/"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ This monorepo includes the following packages/apps:
- `codac-lms`: a [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/) dedicated to making a standadone LMS
[deployed](https://codac-lms.vercel.app/)

- `codac-quasseln`: a [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/) for a real time homegrown chat app

### Packages

- `codac-graphql-types`: a graphql types code generation app using codegen. It generates types and custom react hooks to query the CODAC administration server
Expand Down
3 changes: 0 additions & 3 deletions apps/codac-community/src/components/chat/chat-bubble.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import React from "react";

import { useAuth } from "#/contexts/authContext";
Expand Down
1 change: 1 addition & 0 deletions apps/codac-community/src/components/chat/chat-room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const ChatRoom: React.FC<Props> = ({ roomId }) => {
useEffect(() => {
if (socket) {
socket.on("chat:update", (chatEvent: Chat) => {
console.log("chatEvent", chatEvent);
const history = chatEvent.messages as ComponentChatMessage[];
history.length && setChatHistory(history);
});
Expand Down
1 change: 1 addition & 0 deletions apps/codac-community/src/components/community/students.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { StudentEntity } from "codac-graphql-types";
import { Card, SkeletonCards } from "codac-ui";

import type { ApolloGenericQuery } from "#/types/apollo";

// graphql query
const GetStudentsDocument = gql`
query getAllStudents {
Expand Down
3 changes: 0 additions & 3 deletions apps/codac-community/src/pages/chat/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-call */
import { useGetChatsQuery } from "codac-graphql-types";
import { Button, Card } from "codac-ui";
import { useEffect, useState } from "react";
Expand Down
2 changes: 1 addition & 1 deletion apps/codac-lms/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions apps/codac-quasseln/.env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_CODAC_SERVER_URL=https://codac-admin-dev.up.railway.app
CODAC_SSG_TOKEN=989bba2e3e472d69828bca8bc8e753d901a18676fd5ddb1c423b469b44853de729ec0d337263e0e87bd8a51aefe4ce101c21ea859f6c8a7389245ccf0fe8a3f155ed8c7e55720132450deae5baaf6b37221c438a974f157c78fb3a4a7473cd1cba04bb4b7a5482a895fc8e33ac6240f507f12111bc5a47bbd36687c1224f96cd
34 changes: 34 additions & 0 deletions apps/codac-quasseln/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# 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
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
30 changes: 30 additions & 0 deletions apps/codac-quasseln/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Getting Started

First, run the development server:

```bash
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## 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/foundations/about-nextjs) - 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_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
1 change: 1 addition & 0 deletions apps/codac-quasseln/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("jest-config/jest.config");
5 changes: 5 additions & 0 deletions apps/codac-quasseln/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
15 changes: 15 additions & 0 deletions apps/codac-quasseln/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
reactStrictMode: true,
// experimental: {
// appDir: true,
// },
transpilePackages: ["codac-ui", "codac-graphql-types"],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "res.cloudinary.com",
},
],
},
};
40 changes: 40 additions & 0 deletions apps/codac-quasseln/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"private": true,
"name": "codac-quasseln",
"version": "1.0.1",
"scripts": {
"dev": "next dev --port 3000",
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "jest --coverage --passWithNoTests"
},
"dependencies": {
"@apollo/link-error": "^2.0.0-beta.3",
"apollo-upload-client": "^17.0.0",
"codac-ui": "workspace:*",
"next": "13.4.1",
"nookies": "^2.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"socket.io-client": "^4.6.2"
},
"devDependencies": {
"@types/apollo-upload-client": "^17.0.2",
"@types/lodash.isequal": "^4.5.6",
"@types/node": "^18.11.17",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"autoprefixer": "^10.4.13",
"codac-graphql-types": "workspace:*",
"eslint-config-custom": "workspace:*",
"jest-config": "workspace:*",
"lodash.isequal": "^4.5.0",
"next-config": "workspace:*",
"postcss": "^8.4.20",
"tailwind-config": "workspace:*",
"tailwindcss": "^3.2.4",
"tsconfig": "workspace:*",
"typescript": "^4.9.4"
}
}
1 change: 1 addition & 0 deletions apps/codac-quasseln/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("tailwind-config/postcss.config");
Loading

3 comments on commit a1f2086

@vercel
Copy link

@vercel vercel bot commented on a1f2086 Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

codac-community – ./apps/codac-community

codac-community-codeacademyberlin.vercel.app
codac-community-git-main-codeacademyberlin.vercel.app
codac-community.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a1f2086 Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

codac-ui – ./packages/codac-ui

codac-ui-git-main-codeacademyberlin.vercel.app
codac-ui-codeacademyberlin.vercel.app
codac-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a1f2086 Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

codac-lms – ./apps/codac-lms

codac-lms.vercel.app
codac-lms-git-main-codeacademyberlin.vercel.app
codac-lms-codeacademyberlin.vercel.app

Please sign in to comment.