Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a new version of hacksquad #124

Draft
wants to merge 355 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
355 commits
Select commit Hold shift + click to select a range
b257165
fix: minor changes
andrewgolovanov Sep 14, 2023
e619803
fix: minor changes
andrewgolovanov Sep 14, 2023
029ab15
fix: style optimization and improvements
andrewgolovanov Sep 14, 2023
f041ae0
fix: minor changes
andrewgolovanov Sep 14, 2023
c7202ee
chore: add small adjustments
andrewgolovanov Sep 14, 2023
493e55f
Merge pull request #6 from pixel-point/fix-styles
andrewgolovanov Sep 14, 2023
1cc6000
fix: minor changes
andrewgolovanov Sep 14, 2023
f174c87
fix: minor changes
andrewgolovanov Sep 14, 2023
b8119cd
fix: og font buffer
yasell Sep 15, 2023
4247d07
fix: revert og font buffer
yasell Sep 15, 2023
1ef388a
fix: og font URL update
yasell Sep 15, 2023
47b24f6
fix: change og font type
yasell Sep 15, 2023
c23df21
fix: test og font url
yasell Sep 15, 2023
a767ecc
fix: remove custom og font
yasell Sep 15, 2023
2daa025
fix: ticket – remove sign-up button from home for authorized
yasell Sep 15, 2023
0d8d20f
Merge pull request #7 from pixel-point/og-image-fix
yasell Sep 15, 2023
725ca01
fix: minor changes
andrewgolovanov Sep 15, 2023
f820e87
Merge branch 'main' of https://github.com/pixel-point/novu-hacksquad-…
andrewgolovanov Sep 15, 2023
bf2f05f
chore: update twitter-timeline link weight
yasell Sep 15, 2023
b44efca
chore: remove legacy jetbrains-mono files
yasell Sep 15, 2023
f18a498
Merge branch 'main' of github.com:pixel-point/novu-hacksquad-2023
yasell Sep 15, 2023
039453e
fix: get teams for leaderboard page
andrewgolovanov Sep 15, 2023
4b26c70
Merge branch 'main' of https://github.com/pixel-point/novu-hacksquad-…
andrewgolovanov Sep 15, 2023
0042a23
fix: auto asign team
andrewgolovanov Sep 15, 2023
a7d8d2f
fix: minor changes
andrewgolovanov Sep 15, 2023
f60a96f
fix: api response
andrewgolovanov Sep 15, 2023
283de25
feat: update leaderboard hero and join-us style
yasell Sep 15, 2023
6ae14f4
Merge branch 'main' into design-update
yasell Sep 15, 2023
095d868
fix: leaderboard hero index
yasell Sep 15, 2023
94a6071
fix: revert another footer
yasell Sep 15, 2023
b38a530
feat: update hero illustration
andrewgolovanov Sep 15, 2023
c63d2e7
fix: update mobile sign-up button
yasell Sep 15, 2023
9c8b21a
Merge branch 'design-update'
yasell Sep 15, 2023
8e081bd
fix: update logo quality
andrewgolovanov Sep 15, 2023
7101407
Merge branch 'main' of https://github.com/pixel-point/novu-hacksquad-…
andrewgolovanov Sep 15, 2023
dd63b5f
fix: align mobile sign-up button
yasell Sep 15, 2023
371b9f1
chore: update logo
yasell Sep 15, 2023
f30b9aa
chore: add join-us links and update leaderboard hero
yasell Sep 15, 2023
5f29f7f
chore: logging update-user route
yasell Sep 15, 2023
a3a6baf
fix: simplify update-user route
yasell Sep 15, 2023
7cc1404
fix: simplify update-user route
yasell Sep 15, 2023
8750c4a
fix: enable ssr for ticket page
yasell Sep 15, 2023
64de8da
feat: add hover style
yasell Sep 15, 2023
932b083
chore: add small adjustments
andrewgolovanov Sep 15, 2023
8babb9f
feat: add a new version of hacksquad
andrewgolovanov Sep 15, 2023
ed012fa
fix: minor changes
andrewgolovanov Sep 15, 2023
fededf9
fix: minor changes
andrewgolovanov Sep 15, 2023
4f9df69
chore: add small adjustments
andrewgolovanov Sep 15, 2023
b34e855
chore: add small adjustments
andrewgolovanov Sep 15, 2023
d02deda
fix: minor changes
andrewgolovanov Sep 15, 2023
e34e3c1
chore: update schema
andrewgolovanov Sep 15, 2023
f71cbe4
fix: minor changes
andrewgolovanov Sep 15, 2023
5409b30
fix: minor changes
andrewgolovanov Sep 15, 2023
adb5b8c
fix: move update-user to pages
yasell Sep 15, 2023
48f604f
chore: add small adjustments
andrewgolovanov Sep 15, 2023
eb0a448
fix: minor changes
andrewgolovanov Sep 15, 2023
125613e
chore: add small adjustments
andrewgolovanov Sep 15, 2023
c635868
fix: update og image route
yasell Sep 15, 2023
8564be4
chore: add small adjustments
andrewgolovanov Sep 15, 2023
c901e3e
fix: minor changes
andrewgolovanov Sep 15, 2023
5f87516
fix: minor changes
andrewgolovanov Sep 15, 2023
8316c98
fix: minor changes
andrewgolovanov Sep 15, 2023
a2488fc
chore: add small adjustments
andrewgolovanov Sep 15, 2023
26b242a
chore: add small adjustments
andrewgolovanov Sep 15, 2023
1a1f922
fix: minor changes
andrewgolovanov Sep 15, 2023
5c992d2
feat: add mailchimp integration
andrewgolovanov Sep 15, 2023
0af4c63
fix: minor changes
andrewgolovanov Sep 15, 2023
8bb6ed1
fix: minor changes
andrewgolovanov Sep 15, 2023
b5fa595
Merge branch 'main' of https://github.com/pixel-point/novu-hacksquad-…
andrewgolovanov Sep 15, 2023
ac134b3
fix: minor changes
andrewgolovanov Sep 15, 2023
8d012a1
chore: trigger build
andrewgolovanov Sep 15, 2023
34be4b7
fix: display share buttons
andrewgolovanov Sep 15, 2023
84e17a2
Merge branch 'main' into new-hacksquad
andrewgolovanov Sep 15, 2023
471e942
fix: minor changes
andrewgolovanov Sep 15, 2023
663200a
Merge branch 'main' into new-hacksquad
andrewgolovanov Sep 15, 2023
e2a7b16
feat: add notification center
andrewgolovanov Sep 15, 2023
75ebdcb
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 15, 2023
b41f6e6
chore: add small adjustments
andrewgolovanov Sep 15, 2023
eba804d
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 15, 2023
91a524d
fix: seo meta data
andrewgolovanov Sep 15, 2023
d51a4d0
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 15, 2023
bf12e5f
chore: revalidate leaderboard
andrewgolovanov Sep 16, 2023
6ad649e
test: revalidate leaderboard page
andrewgolovanov Sep 16, 2023
1e27da0
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 16, 2023
39b6dc7
fix: invite page
andrewgolovanov Sep 16, 2023
1b5b794
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 16, 2023
b734738
test: invite page
andrewgolovanov Sep 16, 2023
74074df
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 16, 2023
6e63aab
fix: invite api route
andrewgolovanov Sep 16, 2023
efc77a0
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 16, 2023
ed7bf58
fix: minor changes
andrewgolovanov Sep 16, 2023
e28b697
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 16, 2023
27c2103
fix: minor changes
andrewgolovanov Sep 16, 2023
d5bfe35
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 16, 2023
51a1cd8
test: api invite
andrewgolovanov Sep 16, 2023
fdfec36
Merge branch 'main' into new-hacksquad
andrewgolovanov Sep 16, 2023
6cc082c
fix: minor changes
andrewgolovanov Sep 16, 2023
6d7c1c2
Merge branch 'main' into new-hacksquad
andrewgolovanov Sep 16, 2023
12ed39f
feat: add button states
andrewgolovanov Sep 16, 2023
a30ae9c
fix: minor changes
andrewgolovanov Sep 16, 2023
9f94f56
fix: minor changes
andrewgolovanov Sep 16, 2023
f5cd1f3
Merge branch 'main' into new-hacksquad
andrewgolovanov Sep 16, 2023
570da18
feat: add meta data for invite page
andrewgolovanov Sep 16, 2023
3af66b9
Merge branch 'main' into new-hacksquad
andrewgolovanov Sep 16, 2023
7c77bd7
feat: add initial animation for ticket
andrewgolovanov Sep 16, 2023
a15caca
Merge remote-tracking branch 'origin' into new-hacksquad
andrewgolovanov Sep 16, 2023
fb1e796
feat: social share
Sep 17, 2023
f111bad
feat: tag
Sep 17, 2023
13d1672
feat: link
Sep 17, 2023
e8156f4
feat: rules
Sep 17, 2023
1b5b4ad
feat: commit
Sep 17, 2023
8808c48
feat: rules
Sep 17, 2023
e8097a2
feat: text-sm
Sep 17, 2023
3bcaf98
feat: smaller text
Sep 17, 2023
64b8068
feat: text size
Sep 17, 2023
c118063
feat: bigger text
Sep 17, 2023
e142174
feat: status fix
Sep 17, 2023
7e7beba
feat: sponsor fix
Sep 17, 2023
e3f1cfa
feat: track your tweet
Sep 17, 2023
edcff1d
feat: hacksquad
Sep 17, 2023
2a437b8
feat: user handle
Sep 17, 2023
ac24117
feat: fix novu
Sep 17, 2023
0db58cf
feat: change
Sep 17, 2023
a2a67f4
feat: fixes
Sep 17, 2023
bbbf1c2
feat: join us
Sep 17, 2023
d260fa4
feat: fix
Sep 17, 2023
3db6fd8
feat: fix
Sep 17, 2023
a8a4fec
feat: fix
Sep 17, 2023
d9c0bf5
feat: og
Sep 17, 2023
4c45e5e
feat: invite
Sep 18, 2023
925ba96
feat: id
Sep 18, 2023
6581ec3
feat: id
Sep 18, 2023
1447c2e
feat: test
Sep 18, 2023
eafa68b
feat: another test
Sep 18, 2023
cc7d564
feat: mobile fix
Sep 18, 2023
1f11fb0
fix: minor changes
andrewgolovanov Sep 18, 2023
680cc01
fix: add Novu to sponsors list and fix FAQ html
yasell Sep 18, 2023
aca4778
fix: logic of displaying buttons for a ticket
andrewgolovanov Sep 18, 2023
d98568d
Merge branch 'new-hacksquad' of https://github.com/pixel-point/novu-h…
andrewgolovanov Sep 18, 2023
f53d93a
fix: minor changes
andrewgolovanov Sep 18, 2023
08a8588
fix: sponsors anchor
andrewgolovanov Sep 18, 2023
2b5b652
chore: update twitter-timeline content
yasell Sep 18, 2023
205800d
Merge branch 'new-hacksquad' of github.com:pixel-point/novu-hacksquad…
yasell Sep 18, 2023
45cec7c
chore: update twitter-timeline styles
yasell Sep 18, 2023
088dfa8
feat: add social preview
andrewgolovanov Sep 18, 2023
3a529a1
fix: minor changes
andrewgolovanov Sep 18, 2023
df61ea2
Merge branch 'new-hacksquad' of https://github.com/pixel-point/novu-h…
andrewgolovanov Sep 18, 2023
a248945
fix: show full name for default ticket
yasell Sep 18, 2023
b88c318
fix: update user
andrewgolovanov Sep 18, 2023
2b6d8c0
Merge branch 'new-hacksquad' of https://github.com/pixel-point/novu-h…
andrewgolovanov Sep 18, 2023
2e20eb4
feat: font and image optimization
andrewgolovanov Sep 18, 2023
082c915
fix: minor changes
andrewgolovanov Sep 18, 2023
84128da
chore: optimize images
andrewgolovanov Sep 18, 2023
c37198d
fix: logs page and add ReactSearchAutocomplete
yasell Sep 18, 2023
179b102
Merge pull request #126 from novuhq/logs-page-fixes
andrewgolovanov Sep 18, 2023
f1cbda5
fix: update leaderboard design
yasell Sep 18, 2023
5e2b4b9
fix: ticket styles
andrewgolovanov Sep 18, 2023
90d454a
fix: update sign-up button hover
yasell Sep 18, 2023
76c1d65
fix: update leaderboard row hover
yasell Sep 18, 2023
b4b68ed
fix: minor changes
andrewgolovanov Sep 18, 2023
f276e3b
fix: minor changes
andrewgolovanov Sep 18, 2023
bb1b990
fix: minor changes
andrewgolovanov Sep 18, 2023
01a023c
fix: update layout styles
yasell Sep 18, 2023
9de4994
fix: add isAuthorized flag for old-header and old-footer
yasell Sep 19, 2023
b3c68cb
fix: update old styles font family
yasell Sep 19, 2023
999c8bb
fix: add old-header/old-footer loading status handler
yasell Sep 19, 2023
df20c9f
fix: add new sign-up button to mobile menu
yasell Sep 19, 2023
ae5d5a2
fix: update leaderboard style
yasell Sep 19, 2023
9388a4b
fix: update leaderboard style
yasell Sep 19, 2023
c53639c
fix: update old seo component
yasell Sep 19, 2023
a5f169a
fix: update faq component
yasell Sep 19, 2023
758477d
fix: join-us rounded
yasell Sep 19, 2023
4caed7f
fix: minor chages
andrewgolovanov Sep 21, 2023
7813431
chore: update inter-light font file
yasell Sep 21, 2023
eac9cb2
chore: add small adjustments
andrewgolovanov Sep 21, 2023
f472a09
Merge branch 'design-fixes' of github.com:novuhq/hacksquad-website in…
andrewgolovanov Sep 21, 2023
cc2fc83
Merge pull request #127 from novuhq/design-fixes
andrewgolovanov Sep 21, 2023
0774726
feat: update myteam page style
yasell Sep 21, 2023
26d53ca
feat: cleanup myteam page
yasell Sep 21, 2023
22f8cfe
feat: update logs page style
yasell Sep 21, 2023
8227bd7
feat: update joinsquad page style
yasell Sep 21, 2023
448691c
feat: update claim-success page style
yasell Sep 21, 2023
3c65a86
feat: cleanup claim-success page
yasell Sep 21, 2023
71a35ac
feat: update bonuses page style
yasell Sep 21, 2023
f29d8b7
fix: leaderboard table width
yasell Sep 21, 2023
878c90e
fix: team hero links
yasell Sep 21, 2023
f3da821
fix: bonuses table width
yasell Sep 21, 2023
e9f3cd8
fix: logs table width
yasell Sep 21, 2023
1485f02
fix: hero text align
yasell Sep 21, 2023
9904809
fix: update teams component
yasell Sep 21, 2023
0c948b2
fix: update old header Novu component
yasell Sep 25, 2023
efa3a1f
fix: team hero button margin
yasell Sep 25, 2023
d6d6ac7
fix: rename header props userEmail to subscriberId
yasell Sep 25, 2023
7c35a00
Merge pull request #133 from novuhq/myteam-update
andrewgolovanov Sep 25, 2023
773541d
Merge pull request #134 from novuhq/logs-update
andrewgolovanov Sep 25, 2023
d4e6ead
Merge pull request #136 from novuhq/bonuses-update
andrewgolovanov Sep 25, 2023
14cc8f2
Merge pull request #137 from novuhq/claim-success-update
andrewgolovanov Sep 25, 2023
16e470d
Merge pull request #138 from novuhq/joinsquad-update
andrewgolovanov Sep 25, 2023
f49d6df
feat: bonus number
Sep 30, 2023
6123479
Merge remote-tracking branch 'origin/new-hacksquad' into new-hacksquad
Sep 30, 2023
8cf4fdb
feat: star bonus
Sep 30, 2023
276d9bf
feat: rsvp
Oct 1, 2023
db37cbd
feat: rules
Oct 1, 2023
903b148
feat: score board
Oct 3, 2023
ce53031
feat: crowd
Oct 3, 2023
f6c94e3
feat: crowd
Oct 3, 2023
a8fdde8
feat: leaderboard
Oct 3, 2023
7787d13
feat: plausible
Oct 3, 2023
a4f596f
feat: star the library
Oct 4, 2023
feb19c4
feat: plausible stars
Oct 4, 2023
f9c7691
feat: plausible stars
Oct 4, 2023
2ab3355
feat: clickvote
Oct 4, 2023
8d4e5e4
feat: clickvote'
Oct 4, 2023
a5c811d
feat: fix bonus
Oct 4, 2023
ceb628f
feat: bonus
Oct 5, 2023
631ed26
feat: align GitHub
Oct 5, 2023
786e5b1
feat: tooljet slack
Oct 5, 2023
aa22051
feat: events
Oct 5, 2023
6ffa5cd
feat: nuxt
Oct 5, 2023
55c0e29
feat: leaderboard change
Oct 5, 2023
8d2f6c5
feat: smaller than 0
Oct 5, 2023
824303f
feat: bonuses
Oct 5, 2023
4c05b09
feat: fixed expired events
Oct 8, 2023
23a9694
feat: more events
Oct 11, 2023
4daf44a
feat: fix
Oct 11, 2023
ee43d4d
feat: fix
Oct 11, 2023
0e0e8d9
feat: powered by
Oct 11, 2023
d2b31f7
feat: star the library
Oct 16, 2023
45c67b4
feat: no referer
Oct 16, 2023
89e6df7
feat: no referer
Oct 16, 2023
4de5344
feat: no referer
Oct 16, 2023
1d1783b
feat: no referer
Oct 16, 2023
3df456d
feat: novu change
Oct 17, 2023
15b3399
feat: product hunt launch
Oct 17, 2023
37c93f2
feat: bonus
Oct 17, 2023
04120aa
feat: fork
Oct 17, 2023
20bd24f
feat: bonuses
Oct 17, 2023
f092f7f
feat: bonus fix
Oct 17, 2023
d8d53a7
feat: show prs
Oct 19, 2023
5d2a616
feat: fix
Oct 19, 2023
6adf7d3
feat: fix
Oct 19, 2023
3e2aee4
feat: product hunt
Oct 19, 2023
3c3a8db
feat: forks
Oct 19, 2023
d9c2054
feat: product hunt
Oct 20, 2023
acc130b
feat: fix
Oct 20, 2023
62ddb59
feat: livecycle event
Oct 30, 2023
f69424c
feat: events
Oct 30, 2023
ac2a5e4
feat: livecycle
Oct 30, 2023
2d48d83
feat: airtable fix
Nov 5, 2023
0472b55
feat: claim location
Nov 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 1 addition & 11 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@
"scope-enum": [
2,
"always",
[
"components",
"constants",
"hooks",
"icons",
"images",
"pages",
"styles",
"templates",
"utils"
]
["app", "components", "constants", "hooks", "svgs", "images", "styles", "utils"]
]
}
}
21 changes: 12 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
GITHUB_SECRET=
NEXT_PUBLIC_DEFAULT_SITE_URL=http://localhost:3000

GITHUB_ID=
GITHUB_SECRET=

DATABASE_URL=
SHADOW_DATABASE_URL=

NEXTAUTH_URL=
NEXTAUTH_SECRET=
NEXTAUTH_DEBUG=false
NEXAUTH_URL=

AIRTABLE_BASE=
AIRTABLE_TABLE_NAME=
AIRTABLE_API_KEY=

MAILCHIMP_KEY=
MAILCHIMP_SERVER=
MAILCHIMP_LIST=
HOST=

NEXT_NOVU_APP_ID=
NOVU_API_KEY=
NEXT_PUBLIC_NOVU_APP_ID=
NEXT_PUBLIC_TWITTER_CLIENT=

TWITTER_AUTH=
AIRTABLE_API_KEY=
AIRTABLE_BASE=
AIRTABLE_TABLE_NAME=
RIDDLE_ANSWER=
15 changes: 12 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ module.exports = {
browser: true,
es6: true,
},
extends: ['airbnb', 'airbnb/hooks', 'airbnb/whitespace', 'prettier'],
extends: [
'airbnb',
'airbnb/hooks',
'airbnb/whitespace',
'prettier',
'plugin:@next/next/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
Expand All @@ -22,13 +28,14 @@ module.exports = {
'no-unused-vars': 'error',
'no-shadow': 'off',
'no-undef': 'error',
'react-hooks/exhaustive-deps': 'off',
'react/prop-types': 'error',
'react/require-default-props': 'off',
'react/no-array-index-key': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-danger': 'off',
'react/react-in-jsx-scope': 'off',
'react/forbid-prop-types': 'off',
'react-hooks/exhaustive-deps': 'warn',
// Changes values from "function-expression" to "arrow-function", original rule setup — https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/rules/react.js#L528
'react/function-component-definition': [
'error',
Expand All @@ -45,6 +52,7 @@ module.exports = {
noSortAlphabetically: true,
},
],
'react/jsx-no-target-blank': ['error', { allowReferrer: true }],
'import/order': [
'error',
{
Expand All @@ -56,6 +64,7 @@ module.exports = {
},
},
],
'import/prefer-default-export': 'off',
'jsx-a11y/label-has-associated-control': [
'error',
{
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/node_modules
/.pnp
.pnp.js
.idea

# testing
/coverage
Expand Down Expand Up @@ -38,4 +37,6 @@ yarn-error.log*

#linters
.stylelintcache
.eslintcache
.eslintcache

.idea/
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"line-length": false,
"ol-prefix": false
}
193 changes: 148 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,162 @@
<p align="center">
<a href="https://hacksquad.dev">
<img alt="logo" src="https://user-images.githubusercontent.com/17677196/190159412-34a1d863-1c2f-49bb-930c-054753137118.jpg">
</a>
</p>
# Pixel Point Next.js Tailwind Starter

<h2 align="center">
Welcome to Hacksquad 2022!
</h2>
<h3 align="center">
Contribute code as a squad, meet community members, participate in workshops, and win SWAG
</h3>
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).

With the fantastic atmosphere of Hacktoberfest, we have decided to create Hacksquad. Hacksquad is here to enhance your **Swag**, meet with more community members and participate in workshops from our great sponsors.
## Table of Contents

<a href="https://www.hacksquad.dev/#sponsors">
</br>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/17677196/191266471-a019b72d-76fa-4553-a778-0662f3ecf8c9.png">
<img src="https://user-images.githubusercontent.com/17677196/191266380-ad1f84cc-ff88-4fe2-ace6-9052ad095922.png" alt="Sponsors"/>
</picture>
</a>
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Learn more](#learn-more)
- [Build the website](#deploy-on-vercel)
- [Project Structure](#project-structure)
- [Code Style](#code-style)
- [ESLint](#eslint)
- [Prettier](#prettier)
- [VS Code](#vs-code)

</br>
</br>
## Getting Started

HackSquad allows contributors to contribute code **as a squad** instead of a single contributor. Engage the community in a friendly competition over the month of October.
1. Clone this repository or hit "Use this template" button

<p align="center">
<a href="https://hacksquad.dev">SIGN UP TO HACKSQUAD 2022, AND JOIN A TEAM 🚀</a>
</p>
```bash
git clone [email protected]:pixel-point/nextjs-tailwind-starter.git
```

## How does it work?
2. Install dependencies

Register to the HackSquad using your GitHub, Join a squad or get assigned to a **random squad**. Each day we will calculate every squad member approved PR and sum them all together. By the end of the event, the top 300 winners will win awesome swag! around ~60 squads!
```bash
npm install
```

<a href="https://www.hacksquad.dev/#swag">
<img src="https://user-images.githubusercontent.com/17677196/191267474-ab378f53-9d40-4dc6-ac98-ce4ceb0a8edc.png" alt="Swag"/>
</a>
## Usage

## What can you expect from the event?
```bash
npm run dev
```

- Meet new community members
- Code contribution, dah 😎
- Participate in awesome workshops such as: How to contribute code, Going over good first issues, Engineering best practices, Solving PRs together.
- Win swag
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

<p align="center">
<a href="https://hacksquad.dev">SIGN UP TO HACKSQUAD 2022, AND JOIN A TEAM 🚀</a>
</p>
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

<p align="center"><strong>You can sign-up for both Hacktoberfest and HackSquad</strong></p>
<p align="center">Still got any questions/queries or just looking for a good team, Join us on <a href="https://discord.gg/dw3aTnnBrN">Discord</a> or <a href="https://twitter.com/HackSquadDev">Twitter</a></p>
<p align="center">Let's crash it 🚀</p>
<p align="center">
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/10lybwxpyas6xmiohohn.gif" alt="Party"/>
</p>
### Learn More

<p align="center"><strong>P.S</strong> If you want to create a workshop for the HackSquad community during October email me at: <a href="mailto:[email protected]">[email protected]</a></p>
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/import?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.

## Project Structure

```text
├── public
├── src
│ ├── components
│ │ ├── pages — React components that are being used specifically on a certain page
│ │ └── shared — React components that are being used across the whole website
│ ├── hooks
│ ├── images
│ ├── pages
│ ├── styles
│ ├── utils
├── next.config.js — Main configuration file for a Next.js site. Read more about it [here](https://nextjs.org/docs/api-reference/next.config.js/introduction)
├── postcss.config.js — Main configuration file of PostCSS. [Read more about it here](https://tailwindcss.com/docs/configuration#generating-a-post-css-configuration-file)
└── tailwind.config.js — Main configuration file for Tailwind CSS [Read more about it here](https://tailwindcss.com/docs/configuration)
```

## Component Folder Structure

### Each component includes

1. Main JavaScript File
2. Index File

### Each component optionally may include

1. Folder with images and icons
2. Folder with data

Also, each component may include another component that follows all above listed rules.

### Example structure

```bash
component
├── nested-component
│ ├── data
│ │ └── nested-component-lottie-data.json
│ ├── images
│ │ ├── nested-component-image.jpg
│ │ ├── nested-component-inline-svg.inline.svg
│ │ └── nested-component-url-svg.url.svg
│ ├── nested-component.js
│ └── index.js
├── data
│ └── component-lottie-data.json
├── images
│ ├── component-image.jpg
│ ├── component-inline-svg.inline.svg
│ └── component-url-svg.url.svg
├── component.js
└── index.js
```

## Code Style

### ESLint

[ESLint](https://eslint.org/) helps find and fix code style issues and force developers to follow same rules. Current configuration is based on [Airbnb style guide](https://github.com/airbnb/javascript).

Additional commands:

```bash
npm run lint
```

Run it to check the current status of eslint issues across project.

```bash
npm run lint:fix
```

Run it to fix all possible issues.

### Prettier

[Prettier](https://prettier.io/) helps to format code based on defined rules. [Difference between Prettier and ESLint](https://prettier.io/docs/en/comparison.html).

Additional commands:

```bash
npm run format
```

Run it to format all files across the project.

### VS Code

Following extensions required to simplify the process of keeping the same code style across the project:

- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

After installation enable "ESLint on save" by adding to your VS Code settings.json the following line:

```json
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
```

You can navigate to settings.json by using Command Pallete (CMD+Shift+P) and then type "Open settings.json".

To enable Prettier go to Preferences -> Settings -> type "Format". Then check that you have esbenp.prettier-vscode as default formatter, and also enable "Format On Save".

Reload VS Code and auto-format will work for you.
4 changes: 1 addition & 3 deletions helpers/create-slug.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ const createSlug = (str) =>
.trim()
.replace(/[^\w\s-]/g, '')
.replace(/[\s_-]+/g, '-')
.replace(/^-+|-+$/g, '')
}-${
makeid(5)}`;
.replace(/^-+|-+$/g, '')}-${makeid(5)}`;

export default createSlug;
13 changes: 13 additions & 0 deletions helpers/find.github.token.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import prisma from '~/prisma/client';

const findGitHubToken = async (userId) => {
const findGitHub = await prisma.account.findFirst({
where: {
userId,
},
});

return findGitHub.access_token;
};

export default findGitHubToken;
8 changes: 4 additions & 4 deletions helpers/find.user.and.team.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { unstable_getServerSession } from 'next-auth/next';

import { authOptions } from '../src/pages/api/auth/[...nextauth]';
import { auth } from '../src/lib/auth';

import prisma from '~/prisma/client';

export default async function findUserAndTeam(req, res) {
const partialUser = await unstable_getServerSession(req, res, authOptions(req, res));
const partialUser = await auth(req, res);

if (!partialUser) {
return { user: null, team: null, admin: false };
}

const { social, winners, ...user } = await prisma.user.findUnique({
where: { email: partialUser.user.email },
include: {
Expand Down
2 changes: 1 addition & 1 deletion helpers/novu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Novu = () => {

return (
<NovuProvider
subscriberId={data.user.email}
subscriberId={data.user.githubHandle}
applicationIdentifier={process.env.NEXT_PUBLIC_NOVU_APP_ID}
>
<PopoverNotificationCenter ref={ref} onNotificationClick={onClick}>
Expand Down
Loading