Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
04c68b4
next
cirosantilli May 30, 2021
a710a92
get profile mostly working
cirosantilli Jun 24, 2021
77f0f9c
profile: get rid of weird post render fetch thing
cirosantilli Jun 25, 2021
10c6fb4
readme
cirosantilli Jun 25, 2021
fcdfadc
only render banner for logged out users
cirosantilli Jun 25, 2021
ec901fa
new article, not new post
cirosantilli Jun 25, 2021
be3b2d8
make navbar exactly compliant
cirosantilli Jun 25, 2021
f61d998
remove more useless emotion from nav, remove false from non active links
cirosantilli Jun 25, 2021
3cd8703
make date format match the reference website, no weekday
cirosantilli Jun 25, 2021
7dc5390
try to set effective image
cirosantilli Jun 25, 2021
4793779
fix build
cirosantilli Jun 25, 2021
adb6dbe
Correct placeholders for logged in user
cirosantilli Jun 25, 2021
6b6ed36
better user settings
cirosantilli Jun 27, 2021
ec16a28
Move comments back to global CSS. Trash button was wrong.
cirosantilli Jun 27, 2021
c5d4fa6
Moving article back as well, looking identical still
cirosantilli Jun 27, 2021
bd71760
Favorite article button add to article!
cirosantilli Jun 27, 2021
8b1c1f5
back
cirosantilli Jun 27, 2021
318b9f0
make profile actually work?
cirosantilli Jun 27, 2021
04e7427
favorite article is working
cirosantilli Jun 28, 2021
97d027d
preparing for follow
cirosantilli Jun 28, 2021
b4cdd91
simplify favorite article a little bit
cirosantilli Jun 28, 2021
99ca025
bak
cirosantilli Jun 28, 2021
6fe9cfa
Become even closer to the Angular
cirosantilli Jun 28, 2021
d98637b
fix your feed, finally
cirosantilli Jun 29, 2021
57d7319
fixed it
cirosantilli Jun 29, 2021
eb9ab2d
Make tags compliant, use a fixed url /
cirosantilli Jun 29, 2021
d65e647
forgotten debug print
cirosantilli Jun 29, 2021
f001175
Conforming profile tab urls /profile/user vs /profile/user/favorites
cirosantilli Jun 29, 2021
c56a015
make tab links shallow
cirosantilli Jun 30, 2021
94547c6
Simplify follow user button a bit more
cirosantilli Jul 1, 2021
7e3ba3b
Factor out the extremelly annoying login check into single function g…
cirosantilli Jul 1, 2021
8d8e1f8
Fix home tabs for logged out user, problem was due to existing duplic…
cirosantilli Jul 1, 2021
4896411
better pages/profile/[pid] name
cirosantilli Jul 1, 2021
371583c
get rid of most of styled
cirosantilli Jul 1, 2021
4961012
remove styled from pagination
cirosantilli Jul 1, 2021
78cf0b2
completely remove emotion
cirosantilli Jul 1, 2021
f47c781
forgot a debug print
cirosantilli Jul 1, 2021
c9680ca
remove a bunch of meta from head
cirosantilli Jul 1, 2021
4bdee48
sketch follow, but not yet working
cirosantilli Jul 1, 2021
2eed2a2
demo more markdown features on test data
cirosantilli Jul 1, 2021
9e12e86
Remove all useless styles from styles.css
cirosantilli Jul 1, 2021
5366aec
Use SCSS for styles rather than raw CSS
cirosantilli Jul 1, 2021
0571fb9
Im unable to fix the favorite button being a few pixels wider than an…
cirosantilli Jul 1, 2021
fc3d0d5
style
cirosantilli Jul 1, 2021
8e12349
remove lazysizes for now
cirosantilli Jul 2, 2021
8897df4
remove unused concurrently from package.json
cirosantilli Jul 2, 2021
3de004c
actually unbreak all images after lazysizes removal
cirosantilli Jul 2, 2021
c907fac
class -> className fixes UI divergence with reference...
cirosantilli Jul 2, 2021
3b0c73f
Favorites working everywhere
cirosantilli Jul 2, 2021
9861998
Identical logged out favorite/follow behaviour.
cirosantilli Jul 2, 2021
7fbadce
Identify and comment the comment space divergence due to missing ul
cirosantilli Jul 2, 2021
6702ff8
allow larger body
cirosantilli Jul 2, 2021
f1e933d
Stop confusing react and next deployments
cirosantilli Jul 2, 2021
f5cf656
trying to get heroku deployment to work again
cirosantilli Jul 2, 2021
f70a55e
restore bin/sync-db. What happened to it I wonder?
cirosantilli Jul 2, 2021
d6540f4
readme++
cirosantilli Jul 5, 2021
d806107
even more readme
cirosantilli Jul 5, 2021
ca9274f
remove some rebase artifacts
cirosantilli Jul 6, 2021
5383232
factor out app name everywhere
cirosantilli Jul 6, 2021
7da2967
Sanitize profile images a bit
cirosantilli Jul 6, 2021
eaecd77
Show new comments immediately by fetching the API
cirosantilli Jul 7, 2021
683d2bc
fix build
cirosantilli Jul 7, 2021
0adc4a5
Missed formatDate on comments
cirosantilli Jul 8, 2021
6d786b7
Use ionicons through package.json + webpack.
cirosantilli Jul 8, 2021
b34c137
no more redux
cirosantilli Jul 12, 2021
6031362
uneeded react from app
cirosantilli Aug 2, 2021
d140e97
Factor out login and register forms
cirosantilli Aug 3, 2021
8ebb26b
typos
cirosantilli Aug 3, 2021
8346a21
Disable prerender by default, sanitize configs
cirosantilli Aug 3, 2021
3010e65
fix hook order issues due to early returns
cirosantilli Aug 3, 2021
ecf72dd
--unhandled-rejections=strict on nodemon
cirosantilli Aug 3, 2021
d2639a6
move api out of useless routes subdir
cirosantilli Aug 3, 2021
73c6e29
set session secret to an actual secret
cirosantilli Aug 3, 2021
e9efc06
Get rid of now useless as= in links
cirosantilli Aug 3, 2021
ca6575c
Fix profile settings breaking profile image
cirosantilli Aug 22, 2021
9e7b8e8
google analytics
cirosantilli Aug 26, 2021
82e91e9
google analytics with page hopefully
cirosantilli Aug 26, 2021
1f4ffdc
google analytics page transitions
cirosantilli Aug 26, 2021
0d34f45
force push on heroku deploy
cirosantilli Aug 26, 2021
1ad7b9e
createdAt index
cirosantilli Aug 27, 2021
9be312a
heroku run helper
cirosantilli Aug 27, 2021
632d44b
clearer heroku command doc
cirosantilli Aug 27, 2021
2670ae1
blacklist tags
cirosantilli Aug 31, 2021
7def727
heroku runner that works for all cmds
cirosantilli Sep 1, 2021
a36a9ab
link to source very clearly
cirosantilli Oct 30, 2021
4399937
delete old article when new one is created
cirosantilli Oct 30, 2021
67d7075
delete oldest comment when new one is made in demo mode
cirosantilli Oct 31, 2021
9ef81e7
demoMaxObjs
cirosantilli Oct 31, 2021
3d0afcb
ctrl enter shortcut on article edit
cirosantilli Oct 31, 2021
7903510
fix the article create/delete tag deletion race condition
cirosantilli Dec 3, 2021
8b12c3b
Convert for loop to find tags to be deleted into a single query!
cirosantilli Dec 3, 2021
c0bf057
Autodelete old users as new are created
cirosantilli Dec 6, 2021
fdc57e2
Small doc change.
cirosantilli Dec 6, 2021
aae252d
Let's get rid of that create sequelize meta migration
cirosantilli Dec 6, 2021
8c7f309
Sanitize model validation a bit more removing args: true
cirosantilli Dec 6, 2021
9dfd3df
Use transaction in migration
cirosantilli Dec 10, 2021
d0c5584
Add head title everywhere
cirosantilli Dec 10, 2021
00892b0
And make page titles awesome by adding - Conduit to every titlee
cirosantilli Dec 10, 2021
03e17bc
Sanitize migration automation a bit
cirosantilli Dec 10, 2021
ab70eee
Move all global context under libts and a single class to reduce the …
cirosantilli Dec 10, 2021
ec67e22
Wrap comment author image in CustomImage to handle image error like e…
cirosantilli Dec 10, 2021
7de4872
start a factored routes store
cirosantilli Dec 10, 2021
33da77b
Use sensible names for paging stuff
cirosantilli Dec 10, 2021
1fdbc20
Fix Cannot update a component while rendering a different component w…
cirosantilli Dec 11, 2021
7be1d0e
And fix the build...
cirosantilli Dec 11, 2021
2dad4d1
Fix different number of hooks error that only happens on production
cirosantilli Dec 11, 2021
ae4b26f
Fix pagination last item and not setting page 0 on tab transitions
cirosantilli Dec 11, 2021
167c84a
Make pagination work properly
cirosantilli Dec 12, 2021
43b39ac
Fix "window.gtag is not a function" in npm run start-dev
cirosantilli Dec 13, 2021
844e0a4
First page of index works without javascript
cirosantilli Dec 14, 2021
410366d
First page of profile article lists works without JavaScript
cirosantilli Dec 14, 2021
eb40716
Let's do fallback: 'blocking'
cirosantilli Dec 14, 2021
cc8b56a
Show home tag list without javascript
cirosantilli Dec 14, 2021
45c089f
Try to fix heroku only error undefined.length without debug info, I l…
cirosantilli Dec 14, 2021
1d2877a
minor
cirosantilli Dec 14, 2021
4bbd214
Fix Warning: Prop `href` did not match. Server: "" Client: "/"
cirosantilli Dec 14, 2021
183a26e
fix postgres test url
cirosantilli Dec 14, 2021
e62ba6b
Fix ./bin/generate_demo_data was not setting up SequelizeMeta with fo…
cirosantilli Dec 14, 2021
e1e044e
OK, reproduced in dev, then fixed in one second
cirosantilli Dec 15, 2021
ef9a42b
factor out prod scripts
cirosantilli Dec 15, 2021
a076ed3
Fix article edit, broke it by passing revalidate to getServerProps
cirosantilli Dec 15, 2021
fcf15be
Use routes for all internal links now
cirosantilli Dec 15, 2021
3cf2a93
Move Footer into pages/_app
cirosantilli Dec 15, 2021
a4d6412
Remove useless errorhandler package and handle url param errors more …
cirosantilli Dec 15, 2021
9f7dbe3
Missed Footer reference
cirosantilli Dec 15, 2021
a2992be
Add some typing after failed experiment
cirosantilli Dec 19, 2021
41873b1
Rename toJSONFor to toJson
cirosantilli Dec 19, 2021
b228106
Move all components directly under components/*
cirosantilli Dec 19, 2021
4365931
Fix pagination bug when there are too few pages, need totalPages - 1
cirosantilli Dec 20, 2021
5d6f0ce
Article toJson don't re-fetch user if already present due to JOIN
cirosantilli Dec 21, 2021
7c37dfb
Don't get tags with join on article list, just as we don't get authors
cirosantilli Dec 21, 2021
c9d9983
Revert broken tags change
cirosantilli Dec 21, 2021
1644c4c
On global feed get tags and favorited where we managed to fight seque…
cirosantilli Dec 21, 2021
2239072
bak
cirosantilli Dec 23, 2021
9ee4962
Started API tests under test.js
cirosantilli Dec 25, 2021
f2ee0be
Store user IP in database
cirosantilli Dec 25, 2021
def5faa
Undo tags prefetch, breaks count on API, and thus breaks pagination last
cirosantilli Dec 25, 2021
f1df5fb
Order tags deterministically by createdAt
cirosantilli Dec 25, 2021
540a648
Convert User.ip default from '' to NULL
cirosantilli Dec 26, 2021
a419995
Fix tests
cirosantilli Dec 26, 2021
eb6cd0c
Delete empty tags on article update
cirosantilli Dec 26, 2021
ad58dca
Stop SWR from refreshing data globally
cirosantilli Dec 26, 2021
67d64f4
Fix ISR flickers on page and feed.
cirosantilli Dec 27, 2021
bddabc2
Document how to turn js turn off
cirosantilli Dec 27, 2021
90d709e
Document flickering philosophy
cirosantilli Dec 27, 2021
3deae94
Use same ordering to tags on API and on ISR
cirosantilli Dec 27, 2021
718f320
Document ip logging a bit better
cirosantilli Dec 27, 2021
2f08dde
More antispam ideas
cirosantilli Dec 27, 2021
3b5225f
Created first ssr alternative page under /ssr
cirosantilli Dec 28, 2021
ac9f885
Rationalize all the useSWR madness due to loggedin/vs not loggedin
cirosantilli Dec 28, 2021
b278cce
Don't show alt text of broken images on index
cirosantilli Dec 28, 2021
054a516
Remove some duplicated types dependencies
cirosantilli Dec 29, 2021
2b51688
Upgrade to next 12
cirosantilli Dec 29, 2021
1af5b8d
rename components to front
cirosantilli Dec 29, 2021
f94f5e3
start moving lib into front or back
cirosantilli Dec 29, 2021
802d86b
continue blowing lib up
cirosantilli Dec 29, 2021
1c7e384
Single quotes on imports
cirosantilli Dec 29, 2021
6b50d24
Get linting closer to working
cirosantilli Dec 29, 2021
18d1bde
Linting closer to working
cirosantilli Dec 29, 2021
d63bb55
Just need to fix some prettier now
cirosantilli Dec 29, 2021
ca8d803
autoformat incoming
cirosantilli Dec 29, 2021
ffa2ef8
bak
cirosantilli Dec 29, 2021
5abad86
Prettier refactor. I can't believe that everything still seems to wor…
cirosantilli Dec 29, 2021
4d1e11d
Import demo.productionready.io.main.css into the project
cirosantilli Dec 29, 2021
c1ba27d
Embed all fonts in webpack
cirosantilli Dec 29, 2021
e161ec0
Document dependencies vs devDependencies
cirosantilli Dec 30, 2021
0f0eb50
Gigignore tsbuildinfo
cirosantilli Dec 30, 2021
435ff76
Almost finish busting lib/utils
cirosantilli Dec 30, 2021
f4a537f
All easy lint fixes done
cirosantilli Dec 31, 2021
fdc4daf
Deploy branch on GitHub
cirosantilli Dec 31, 2021
41deca6
Closer to lint
cirosantilli Jan 1, 2022
bf2eec3
OK, just ignore some lints, don't know how to handle them
cirosantilli Jan 2, 2022
67962af
Move all frontend safe code into front/
cirosantilli Jan 2, 2022
2bbce51
prettier
cirosantilli Jan 2, 2022
452ca0e
Move db to toplevel
cirosantilli Jan 2, 2022
d6d7566
Fix test on PG and add proper alias. Run tests on SQLite and PG befor…
cirosantilli Jan 27, 2022
3940a32
Fix delete old tags query on PostgreSQL
cirosantilli Jan 27, 2022
fe62526
Add --empty to bin/generate-demo-data.js
cirosantilli Jan 27, 2022
dc3f8f3
After 3940a32327a9131b18aded46bc6b73cd6c6052e0 also noticed that ther…
cirosantilli Jan 27, 2022
0b25bf2
Automatically clean the database before each test
cirosantilli Jan 27, 2022
42256cc
Satisfy lint
cirosantilli Jan 27, 2022
23996c5
Document must install PG before deploy
cirosantilli Jan 27, 2022
192edc5
Fix nbsp without ; on comment
cirosantilli Feb 14, 2022
032a90d
Fix heroku addons create on README
cirosantilli Feb 14, 2022
e1817b3
Specify node and npm versions for heroku
cirosantilli Feb 14, 2022
a776a65
Document node and NPM versions
cirosantilli Feb 14, 2022
866f401
refactor: small SSR page refactor
cirosantilli Mar 14, 2022
fb5a3a6
Log user off on invalid login for SSR
cirosantilli Mar 20, 2022
023b896
readme
cirosantilli Mar 23, 2022
8dff36e
nitpick
cirosantilli Mar 24, 2022
acac42b
typescript: remove all easy any
cirosantilli Apr 6, 2022
42d63be
test: enable a next.js test
cirosantilli Apr 6, 2022
55194d8
lint
cirosantilli Apr 6, 2022
f32c3bc
lint: @typescript-eslint
cirosantilli Apr 6, 2022
c547788
Fix pagination not showing first page when there are few pages
cirosantilli Apr 6, 2022
09d3bb1
deploy: fix
cirosantilli Apr 6, 2022
19522b6
factor out settings and login local storage actions
cirosantilli Apr 11, 2022
31dba24
Prevent password autocomplete on settings form
cirosantilli Apr 22, 2022
f30ea98
ourbigbook.com features
cirosantilli Jul 5, 2022
729e241
readme
cirosantilli Jul 26, 2022
b7f8b80
heroku
cirosantilli Aug 26, 2022
5241655
added tests on cypress
Feb 9, 2023
2cf5472
fixed readme link
Feb 9, 2023
d638335
updated package file
Feb 13, 2023
adde9d4
login command added, reference types added
Feb 14, 2023
9a997ed
removed red commands
May 3, 2023
75b44c5
updated instr
Jun 6, 2023
ce2c14c
updated readme
Jun 6, 2023
2ac66e8
dev.md updated
Jun 7, 2023
ac0c8bf
eslint updated
Jun 7, 2023
83482df
package.json updated, added cross-env
Jun 8, 2023
54d5ffe
updated data-cy attributes, updated readme file
Jun 12, 2023
5ae0312
Merge pull request #29 from mate-academy/update_data_cy
iBrianWarner Jun 12, 2023
52c3ac9
readme updated
Jun 12, 2023
3cde02f
updated lint rules, updated POM
Jul 11, 2023
0cc727f
faker updated
Apr 8, 2024
dd4d2a8
gh actions config is added
OleksiiBlezniuk Feb 5, 2025
4024bab
Update test.yml
OleksiiBlezniuk Feb 5, 2025
7e0de3f
Update test.yml
OleksiiBlezniuk Feb 5, 2025
1976b88
Update test.yml
OleksiiBlezniuk Feb 5, 2025
1540211
Merge pull request #205 from mate-academy/add-github-action-config
OleksiiBlezniuk Feb 6, 2025
43fea2f
Add hint to a readme file
OleksiiBlezniuk Feb 18, 2025
c0f5e2f
Merge pull request #209 from mate-academy/add-hint-to-readme-file
OleksiiBlezniuk Feb 18, 2025
6dfa85c
Sol1
TomaszKrzywicki Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
env: {
browser: true,
es2021: true,
'cypress/globals': true
},
extends: [
'plugin:cypress/recommended'
],
overrides: [
],
parserOptions: {
ecmaVersion: 'latest'
},
plugins: [
'cypress'
],
rules: {
semi: ['error', 'always'],
'space-before-function-paren': 'off',
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'cypress/no-async-tests': 'error',
'cypress/no-pause': 'error',
'max-len': ['error', 80, {
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
ignoreComments: true
}],
'arrow-parens': ['error', 'always'],
quotes: ['error', 'single', { allowTemplateLiterals: true }],
'no-console': ['error']
}
};
10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test

on:
pull_request:
branches: [ next ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install --legacy-peer-deps
- run: |
npm run dev &
npm run test-e2e
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,21 @@ node_modules
.tern-port

db.sqlite3
db.sqlite3-journal
/.env

package-lock.json

# Temporary files
*.tmp
tmp.*
*.bak

# next.js
/.next/
/out/
/.now/
.now

# typescript
*.tsbuildinfo
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "react-redux-realworld-example-app"]
path = react-redux-realworld-example-app
url = https://github.com/cirosantilli/react-redux-realworld-example-app
[submodule "realworld"]
path = realworld
url = https://github.com/cirosantilli/realworld
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 2 additions & 0 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.md
.next
64 changes: 64 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## Prettier specific

/realworld

## Copy of .gitinore
# Needed until they implement:
# https://github.com/prettier/prettier/issues/8048

# Logs
logs
*.log
.DS_Store

npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

.idea

.tern-port

db.sqlite3
db.sqlite3-journal
/.env

package-lock.json

# Temporary files
*.tmp
tmp.*
*.bak

# next.js
/.next/
/out/
/.now/
.now
5 changes: 5 additions & 0 deletions .sequelizerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var path = require('path')

module.exports = {
'config': path.resolve(path.join('front', 'config.js')),
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js: "8"
node_js: '8'
sudo: false

before_script: npm start & sleep 5
Expand Down
Loading