Insightor is a user-friendly platform that allows users to create, rate, and comment on articles. With features such as creating tags for articles, searching articles based on these tags, basic CRUD operations for articles and reviews, user authentication, and user profile editing, Insightor offers a comprehensive environment for sharing and evaluating content.
- Frontend: React + Vite
- Backend: NestJS
- Database: PostgreSQL
- Containerization: Docker
To give you a taste of what to expect, here's a preview of Insightor:
-
Article Creation & Management
- Create, edit, delete and view articles.
- Basic CRUD operations for article reviews.
- Assign tags/categories to articles.
-
User Interaction
- Rate and comment on articles.
- Search articles based on tags/categories.
-
User Account Management
- User registration and login.
- Edit basic user information.
- Ensure that you have Docker installed on your machine. If not, download it from Docker Official Page.
-
Clone the Repository
git clone https://github.com/Adam0s007/Blog.git cd Blog
-
Start Docker
Make sure Docker is running on your machine. Refer to Docker's official documentation if you encounter any issues.
-
Run the Application
Follow the steps below to run the application:
-
Start the Services:
Navigate to the project directory and execute the following command:
docker-compose up
This command will start all the services defined in
docker-compose.yml
file, setting up the entire stack including the frontend, backend, and database. Note: Sometimes, the last message you see might be:LOG: database system is ready to accept connections
In such cases, you may need to stop the services by usingCTRL+C
or running thedocker-compose down
command. After stopping the services, restart them by executingdocker-compose up
again. This helps in ensuring that all the services are properly synchronized and functioning together. -
Inject Sample Data:
While the container is running, execute the following command to inject data from
blog_dump.sql
into the database. Replaceinsightor-postgres-1
with the actual name of your PostgreSQL container if it’s different.docker exec -i insightor-postgres-1 psql -U postgres -c "DROP DATABASE IF EXISTS blog;" docker exec -i insightor-postgres-1 psql -U postgres -c "CREATE DATABASE blog;" cat blog_dump.sql | docker exec -i insightor-postgres-1 psql -U postgres blog
The application should now be up and running with the sample data from
blog_dump.sql
.Note: Make sure Docker and Docker Compose are correctly installed and configured on your system before running the above commands. Refer to the Docker documentation and Docker Compose documentation for installation and configuration guidelines.
-
-
Access the Application
Once the Docker containers are up and running, open your web browser and navigate to:
http://127.0.0.1:4000/
- Register / login to start interacting with the platform.
- Once logged in, you can create, edit, or delete articles and reviews.
- Explore articles based on tags/categories or through the search functionality.
- Update your user information through the user profile section.
This project is licensed under the MIT License. See the LICENSE file for details.