{"id":13606795,"url":"https://github.com/willianantunes/nextjs-playground","last_synced_at":"2025-07-12T22:32:02.755Z","repository":{"id":76065498,"uuid":"200403231","full_name":"willianantunes/nextjs-playground","owner":"willianantunes","description":"Production grade React applications that scale? Let's see it!","archived":false,"fork":false,"pushed_at":"2020-12-12T15:56:00.000Z","size":455,"stargazers_count":51,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-07T12:41:00.621Z","etag":null,"topics":["atlassian","challenge","indexeddb","javascript","jest","nextjs","react","redux"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willianantunes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-03T17:31:05.000Z","updated_at":"2024-10-26T02:41:15.000Z","dependencies_parsed_at":"2024-01-16T23:30:20.624Z","dependency_job_id":"e6f6df9d-ebea-4cb7-8a22-a1ee4a7fab86","html_url":"https://github.com/willianantunes/nextjs-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willianantunes%2Fnextjs-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willianantunes%2Fnextjs-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willianantunes%2Fnextjs-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willianantunes%2Fnextjs-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willianantunes","download_url":"https://codeload.github.com/willianantunes/nextjs-playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225839615,"owners_count":17532307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atlassian","challenge","indexeddb","javascript","jest","nextjs","react","redux"],"created_at":"2024-08-01T19:01:12.477Z","updated_at":"2024-11-22T04:13:43.225Z","avatar_url":"https://github.com/willianantunes.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Next.JS Playground\n\n![Actions Status](https://github.com/willianantunes/nextjs-playground/workflows/Build%20and%20publish/badge.svg)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=willianantunes_nextjs-playground\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=willianantunes_nextjs-playground)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=willianantunes_nextjs-playground\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=willianantunes_nextjs-playground)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=willianantunes_nextjs-playground\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=willianantunes_nextjs-playground)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=willianantunes_nextjs-playground\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=willianantunes_nextjs-playground)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=willianantunes_nextjs-playground\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=willianantunes_nextjs-playground)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=willianantunes_nextjs-playground\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=willianantunes_nextjs-playground)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=willianantunes_nextjs-playground\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=willianantunes_nextjs-playground)\n\nFirst I use it to test Next.JS and its various features. I had a big headache to configure Jest with it in order to work\nproperly but now everything seems OK.\n\nWell here you'll see my solution for a **code-challenge** which I believe is not used anymore as it is old, maybe if you\nsearch for it you may find it somewhere in GitHub.\n\nAs always I'm following [Yoda's philosophy](https://github.com/be-dev-yes/yoda), that's why this project exists.\n\n## Run NOW with Docker\n\nSimply execute:\n\n    docker run -itd --name nextjs-playground \\\n    -p 3000:3000 \\\n    -e NEXTJS_BIND_PORT=3000 \\\n    -e API_TVMAZE_ENDPOINT=https://api.tvmaze.com \\\n    -e PAGE_DETAILS_ENDPOINT=http://localhost:3000/api/page-details \\\n    willianantunes/nextjs-playground\n\nAccess on your browser: http://localhost:3000\n\nSee the logs:\n\n    docker logs -f nextjs-playground\n\n## How to run and test it locally\n\nRun it:\n\n    docker-compose up app\n\nExecute the following to test everything:\n\n    docker-compose up all-test\n\n## Challenge details\n\n1. **@mentions**: A way to mention a user. Always starts with an '@' and ends when hitting a non-word.\n2. **Emoticons**: For this exercise, you only need to consider 'custom' emoticons which are ASCII strings, no longer\n   than 15 characters, contained in parenthesis. You can assume that anything matching this format is an emoticon.\n3. **Links**: Any URLs contained in the message, along with the page's title.\n\nFor example, calling your function with the following inputs should result in the corresponding return values.\n\n**Input:** \"@chris you around?\"\n\n**Return (string):**\n\n    {\n      \"mentions\": [\n        \"chris\"\n      ]\n    }\n\n**Input:** \"Good morning! (megusta) (coffee)\"\n\n**Return (string):**\n\n    {\n      \"emoticons\": [\n        \"megusta\",\n        \"coffee\"\n      ]\n    }\n\n**Input:** \"Olympics are starting soon; http://www.nbcolympics.com\"\n\n**Return (string):**\n\n    {\n      \"links\": [\n        {\n          \"url\": \"http://www.nbcolympics.com\",\n          \"title\": \"NBC Olympics | Home of the 2016 Olympic Games in Rio\"\n        }\n      ]\n    }\n\n**Input:** \"@bob @john (success) such a cool feature; https://twitter.com/jdorfman/status/430511497475670016\"\n\n**Return (string):**\n\n    {\n      \"mentions\": [\n        \"bob\",\n        \"john\"\n      ],\n      \"emoticons\": [\n        \"success\"\n      ],\n      \"links\": [\n        {\n          \"url\": \"https://twitter.com/jdorfman/status/430511497475670016\",\n          \"title\": \"Justin Dorfman on Twitter: \\\"nice @littlebigdetail from ...\"\n        }\n      ]\n    }\n\n## Useful links\n\nAbout Next.JS and so on:\n\n- https://nextjs.org/learn/basics/getting-started\n- https://github.com/zeit/next.js/issues/4789\n- https://github.com/zeit/next.js/pull/936\n- http://www.tvmaze.com/api\n- https://zeit.co/\n- https://nextjs.org/docs#production-deployment\n- https://spectrum.chat/next-js/general/why-using-isomorphic-unfetch-rather-than-other-library~743d842d-f429-42d1-8184-570985456dec\n- https://stackoverflow.com/questions/35038857/setting-query-string-using-fetch-get-request\n- https://jaketrent.com/post/environment-variables-in-nextjs/\n- https://zeit.co/blog/next5-1#environment-configuration\n- https://stackoverflow.com/a/53272504/3899136\n- https://github.com/zeit/next.js/issues/7755\n\nAbout testing:\n\n- https://github.com/zeit/next.js/tree/canary/examples/with-jest-react-testing-library\n- https://jestjs.io/docs/en/tutorial-react#setup-without-create-react-app\n- https://jestjs.io/docs/en/tutorial-react#enzyme\n- https://jestjs.io/docs/en/configuration\n- https://jestjs.io/docs/en/expect\n- https://medium.com/@miiny/unit-test-next-js-with-jest-and-enzyme-5b305a8e29fe\n- https://github.com/facebook/jest/issues/3457#issuecomment-465100008\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillianantunes%2Fnextjs-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillianantunes%2Fnextjs-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillianantunes%2Fnextjs-playground/lists"}