A Next.js app running at: https://www.notes-of-solace.xyz/
- Clone the repository:
git clone https://github.com/dblanchard13/notes-of-solace
- Navigate to the project directory:
cd notes-of-solace
- Install the dependencies:
npm install
You can either setup postgres locally or you can use a hosted solution. I personally run it locally since I find it to be the most straightforward. Feel free to go with whatever works best for you, just make sure to grab the DATABASE_URL
.
-
If you don't yet have it installed locally, then head on over here: https://www.postgresql.org/download/macosx/ and come back once you've got it installed (I'm assuming you're on a mac 🐒 -- if not you can head to https://www.postgresql.org/download/ and select the appropriate OS)
-
If you have postgres installed locally you can create a new db with the following command:
createdb <DB_NAME>
- Now you'll want to build your
DATABASE_URL
which is in the format of:postgres://[USER]:[PASSWORD]@[HOST]:[PORT]/[DB_NAME]
Note:
PORT
defaults to5432
PASSWORD
is an empty string for local installs unless you explicitly specified one.USER
can be found by connecting to your db withpsql <DB_NAME>
and then running\du
will show you all available users. Your user will likely be whatever your username is for your laptop though it may also bepostgres
depending on how you installed things.
- Create a
.env
file in the root directory of the project. You'll want it to mirror the what's in.env.example
so you can just run:
cp .env.example .env
- Add/update the following line to the
.env
file, replacingpostgres://[USER]:[PASSWORD]@[HOST]:[PORT]/[DB_NAME]
with your PostgreSQLDATABASE_URL
:
DATABASE_URL=postgres://[USER]:[PASSWORD]@[HOST]:[PORT]/[DB_NAME]
npm run dev
npm run test
- The assignment mentioned an app that would be able to allow a user to 'index' notes. I originally took this to mean that I should make the notes easily/efficiently searchable/sortable by having an index on the columns that the user my search/sort on. While re-reading the requirement I realized that it could also mean allowing the user to set the order of their notes (via drag and drop or some other functionality), but I decided not to implement that for this iteration.
-
Real authentication. For this version I went with a simple approach of storing a generated userId in localStorage, but to make this a production ready product that would need to become something more durable and secure.
-
More exhaustive tests. I added a simple test to show what that setuyp would look like, but in reality that folder of tests should be much more thorough & wide-reaching.
-
Patient association. Be able to associate notes with specific clients so that an Advocate can easily see all of their notes for each of their individual clients.
-
Tagging. Allow advocates to add
#tags
anywhere within the content of their notes that will automatically tie that note to all other notes that share the same tag which they can then filter by. -
Semantic search. This would make search results much more relevant than the current version of does any of the content contain any of the words in the query.
-
Transition Animations. Everything currently 'snaps' into and out of their respective frames. Would be better to smooth that out with animations.
-
Rich text editor. I assume Advocates would like the ability to add more expressive formatting to their notes (bold, strikethrough, bullet points, etc.).
-
Version history. Be able to see past versions of note just in case an Advocate accidentally saves changes that they don't want.