Clone this:
git clone [email protected]:predragnikolic/recall-test.git
cd recall-test
npm install
- Create
.env
files infrontend
. Take a look atfrontend/.env.example
- Create
.env
files inserver
. Take a look atserver/.env.example
- Create a Postgres Database. Give it a name
book_store
and update the.env
DATABASE_URL
. - Put any string for
BETTER_AUTH_SECRET
, or use this command to generate itecho -n any string | shasum -a 256 | awk '{ print $1 }'
- Run db migrations
cd server && npm run db:migrate
(optionally you can seed the database by runningnpm run db:seed
in the server folder) - Start both apps in development
npm run dev
,or start them separatelycd server && npm run dev
andcd frontend && npm run dev
.
Apps: Store - http://localhost:5173/ Admin - http://localhost:5173/admin
Note
For the admin app you need to have a user with admin role. First create a regular user http://localhost:5173/sign-in, then in the server folder run db:unsafe:make-all-users-admins
to make all users Admins. This was done to make the reviewer access the Admin Dashboard.