Docs Cabinet is a cool web app that enables you to create and save your documents. It's stable, intuitive and, best of all, FREE! It was also built using modern tech stacks like PostgreSQL, Node, React etc. One of these tools, CKEditor, enables you to create well-laid out documents complete with bold/italicized text, pictures and much more. You can also control access to your document. That is, you can make them public, private or accessible only to other users with the same role/account type as yours (e.g other admins).
Docs Cabinet also has search features that enable you to easily search for documents or other users.
This project was built using modern technology tools. These include:
- React, for the front end code.
- Materialize CSS, a CSS framework that implements Google's Material Design philosophy.
- React Materialize, a library of reusable, Material-design-themed React Components.
- CKEditor, an awesome, free, open source HTML text editor designed to simplify website content creation. In this app, it enables you to create rich, multi-format documents online.
- PostgreSQL, an open source database.
- Sequelize, a promise-based O.R.M for Node.js v4 and up. It supports PostgreSQL, MySQL, SQLite and MSSQL.
- Scss, for writing custom styles.
- Swagger, to document the app's RESTful endpoints.
Here are the steps you need to follow to run this project on your computer:
-
Install NodeJS: You may visit this link for complete instructions on installing NodeJS on your computer.
-
Install PostgreSQL: You may visit this link for instructions on setting up PostgreSQL on your computer. When you're done, please note your database name, username and password.
-
Open a terminal/command prompt on your computer and
cd
into your preferred path/location. -
Clone this repo: Enter this command in the terminal:
git clone https://github.com/andela-foladipo/docs-cabinet-cp2.git
- Install dependencies: Do so by running the following command:
npm install
Note: npm
is a component of NodeJS that serves as its package manager.
So, it comes along with installing NodeJS.
-
Add the required environment variables: Consult the
.env.sample
file in the root of this repository for info about the different environmental variables you need to specify for this app. When you're done, save your changes in a.env
file in the root of the repo. (Note that you might not have some of this info until later in this installation steps. So it's fine to leave those for now.) -
Initialize the DB: Run the following commands:
npm run db:migrate
npm run db:seed:all
These will create the required tables in the database and seed some of them.
-
Add an admin user: You'll need to manually create an admin user because we don't seed such a user for security reasons. To do this, you can use this document as a guide.
-
That's it! You may now run
npm start
and the app will run on your system. Visitlocalhost:PORT
to browse it.
- You can't upload digital documents (like PDFs).
- You can't share links to documents. Other users can only search for your public documents, or access them if they have the same role/account type as you.
- You can't change your profile picture (yet).
- There is no automated password reset system. If you forget your password, you have to contact an admin and ask him/her to reset it for you.
- This project doesn't use a realtime database (like Firebase DB). So, you have to refresh the page sometimes to get the latest documents or changes.
Found a bug? You can send us a bug report by creating a new issue at this link. If you would rather fix the bug(s) than simply tell us about it, please consult this document for instructions on how to create a fork of this project, implement your solutions and submit a pull request.
Similarly, if you want to help add a new feature, please use this document as a guide on how to fork this repo, add your feature(s) and submit a pull request.
Lastly, you can send your suggestions, feedback etc by tweeting at the Lead Developer, Folusho Oladipo.
This project is authored by Folusho Oladipo and is licensed for your use, modification and distribution under the MIT license. Feel free to hack, extend and share it!
Happy hacking, and see you around!