diff --git a/ppl-assignment-1/.eslintrc.json b/.eslintrc.json similarity index 100% rename from ppl-assignment-1/.eslintrc.json rename to .eslintrc.json diff --git a/.gitignore b/.gitignore index 158d659b2b7ec1bb86cc7a85f44f99de5fc3492c..9756d147910cbca25ae7d7d910135628193f1e7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,39 @@ +# 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* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + .vercel .scannerwork \ No newline at end of file diff --git a/ppl-assignment-1/.vscode/settings.json b/.vscode/settings.json similarity index 100% rename from ppl-assignment-1/.vscode/settings.json rename to .vscode/settings.json diff --git a/README.md b/README.md index fb1a6e74e3738f7b15885ab41be3b2fa40ce0224..84b582a476ff637a1d4d3f7c021b843edd9ac285 100644 --- a/README.md +++ b/README.md @@ -1,92 +1,5 @@ # Repo PPL +My repo for PPL Assignment 1 - -## Getting started - -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://gitlab.cs.ui.ac.id/figo.athallah/repo-ppl.git -git branch -M main -git push -uf origin main -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](https://gitlab.cs.ui.ac.id/figo.athallah/repo-ppl/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. +[](https://sonarqube.cs.ui.ac.id/dashboard?id=figo.athallah_repo-ppl_AYZj-EOhoB3q0Wl8w3wX) \ No newline at end of file diff --git a/ppl-assignment-1/lib/supabaseClient.js b/lib/supabaseClient.js similarity index 100% rename from ppl-assignment-1/lib/supabaseClient.js rename to lib/supabaseClient.js diff --git a/ppl-assignment-1/next.config.js b/next.config.js similarity index 100% rename from ppl-assignment-1/next.config.js rename to next.config.js diff --git a/ppl-assignment-1/package-lock.json b/package-lock.json similarity index 99% rename from ppl-assignment-1/package-lock.json rename to package-lock.json index 1142c4cc4f99f6f7619ecd8822dde492bf3893c4..22b0fa14b5ff8daacb7f352f7b8bb31b516f1ec0 100644 --- a/ppl-assignment-1/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "eslint": "8.34.0", "eslint-config-next": "13.1.6", "mongodb": "^3.5.9", - "next": "13.1.6", + "next": "^13.1.6", "react": "18.2.0", "react-dom": "18.2.0", "typescript": "4.9.5" diff --git a/ppl-assignment-1/package.json b/package.json similarity index 96% rename from ppl-assignment-1/package.json rename to package.json index 8132fcbbc907a398f06cc595a4a95c955fa6497d..27694fdc8c38e037556447aacf7d3f6e66d6de5f 100644 --- a/ppl-assignment-1/package.json +++ b/package.json @@ -19,7 +19,7 @@ "eslint": "8.34.0", "eslint-config-next": "13.1.6", "mongodb": "^3.5.9", - "next": "13.1.6", + "next": "^13.1.6", "react": "18.2.0", "react-dom": "18.2.0", "typescript": "4.9.5" diff --git a/ppl-assignment-1/.gitignore b/ppl-assignment-1/.gitignore deleted file mode 100644 index 4c845c004750742237abeefde280d3c172c42e00..0000000000000000000000000000000000000000 --- a/ppl-assignment-1/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -# 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* -.pnpm-debug.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -.vercel diff --git a/ppl-assignment-1/README.md b/ppl-assignment-1/README.md deleted file mode 100644 index 5bc7ca24acf299de79528561f90495d5b8b26d47..0000000000000000000000000000000000000000 --- a/ppl-assignment-1/README.md +++ /dev/null @@ -1,38 +0,0 @@ -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. - -[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.ts`. - -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. - -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. diff --git a/ppl-assignment-1/public/ennaafk.jpg b/public/ennaafk.jpg similarity index 100% rename from ppl-assignment-1/public/ennaafk.jpg rename to public/ennaafk.jpg diff --git a/ppl-assignment-1/public/favicon.ico b/public/favicon.ico similarity index 100% rename from ppl-assignment-1/public/favicon.ico rename to public/favicon.ico diff --git a/ppl-assignment-1/public/next.svg b/public/next.svg similarity index 100% rename from ppl-assignment-1/public/next.svg rename to public/next.svg diff --git a/ppl-assignment-1/public/thirteen.svg b/public/thirteen.svg similarity index 100% rename from ppl-assignment-1/public/thirteen.svg rename to public/thirteen.svg diff --git a/ppl-assignment-1/public/vercel.svg b/public/vercel.svg similarity index 100% rename from ppl-assignment-1/public/vercel.svg rename to public/vercel.svg diff --git a/ppl-assignment-1/app/globals.css b/src/app/globals.css similarity index 100% rename from ppl-assignment-1/app/globals.css rename to src/app/globals.css diff --git a/ppl-assignment-1/app/head.tsx b/src/app/head.tsx similarity index 100% rename from ppl-assignment-1/app/head.tsx rename to src/app/head.tsx diff --git a/ppl-assignment-1/app/layout.tsx b/src/app/layout.tsx similarity index 100% rename from ppl-assignment-1/app/layout.tsx rename to src/app/layout.tsx diff --git a/ppl-assignment-1/app/page.js b/src/app/page.js similarity index 96% rename from ppl-assignment-1/app/page.js rename to src/app/page.js index e32f41e13f87848435d62ae129def079aa5e0029..93919beb748765ba6dd92519dd942ef49e7623de 100644 --- a/ppl-assignment-1/app/page.js +++ b/src/app/page.js @@ -1,7 +1,7 @@ import Image from 'next/image' import { Inter } from '@next/font/google' import styles from './page.module.css' -import { supabase } from '../lib/supabaseClient'; +import { supabase } from 'lib/supabaseClient'; const inter = Inter({ subsets: ['latin'] }) diff --git a/ppl-assignment-1/app/page.module.css b/src/app/page.module.css similarity index 100% rename from ppl-assignment-1/app/page.module.css rename to src/app/page.module.css diff --git a/ppl-assignment-1/pages/api/hello.ts b/src/pages/api/hello.ts similarity index 100% rename from ppl-assignment-1/pages/api/hello.ts rename to src/pages/api/hello.ts diff --git a/ppl-assignment-1/tsconfig.json b/tsconfig.json similarity index 100% rename from ppl-assignment-1/tsconfig.json rename to tsconfig.json