Skip to content

AKsamrat/critiqo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Critiqo ๐ŸŒŸ

A comprehensive platform for users to create accounts, share product reviews with ratings, categorize reviews, and interact with posts through voting and commenting.

Live Demo GitHub Repo License

๐Ÿ“‹ Table of Contents

๐ŸŽฏ Overview

Critiqo is a modern review platform that allows users to share their experiences with products through detailed reviews and ratings. The platform features premium content with payment integration, community interaction through voting and commenting, and robust admin moderation capabilities.

Key Highlights

  • User-Centric Design: Intuitive interface for seamless user experience
  • Premium Content: Monetization through premium review features
  • Community Driven: Interactive voting and commenting system
  • Admin Control: Comprehensive moderation and content management
  • Scalable Architecture: Built with modern technologies for performance

โœจ Features

๐Ÿ” User Authentication

  • Secure user registration and login
  • JWT-based session management
  • Password reset functionality
  • Profile management

๐Ÿ“ Review Management

  • Create comprehensive product reviews with ratings
  • Edit and update existing reviews
  • Delete reviews with proper authorization
  • Rich text editor support
  • Image upload capabilities

๐Ÿท๏ธ Categories & Organization

  • Organize reviews into product categories
  • Advanced filtering and search options
  • Sort by ratings, date, popularity
  • Tag-based organization

๐Ÿ’Ž Premium Content

  • Sell premium reviews and content
  • Secure payment processing integration
  • Subscription management
  • Revenue tracking

๐Ÿค Interactive Features

  • Upvote and downvote reviews
  • Comment on reviews
  • Reply to comments
  • User reputation system

๐Ÿ‘จโ€๐Ÿ’ผ Admin Moderation

  • Review approval workflow
  • Content moderation tools
  • User management
  • Analytics dashboard

๐Ÿ–ผ๏ธ Media Management

  • Cloudinary integration for image storage
  • Multiple image uploads per review
  • Image optimization and compression
  • Responsive image delivery

๐Ÿ” Search & Discovery

  • Advanced search functionality
  • Filter by categories, ratings, and keywords
  • Sort options for better discovery
  • Trending and popular content

๐Ÿ› ๏ธ Tech Stack

Frontend

  • Next.js - React framework for production
  • React - UI library
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first CSS framework

Backend

  • Node.js - Runtime environment
  • Express.js - Web application framework
  • TypeScript - Type-safe server development

Database & ORM

  • PostgreSQL - Relational database
  • Prisma - Next-generation ORM

Authentication & Security

  • JWT - JSON Web Token authentication
  • Joi - Request validation
  • Bcrypt - Password hashing

File Storage & Processing

  • Cloudinary - Image and video management
  • Multer - File upload handling

Deployment & Infrastructure

  • Vercel - Frontend deployment
  • Railway/Heroku - Backend hosting
  • PostgreSQL Cloud - Database hosting

๐ŸŒ Live Demo

Visit the live application: https://critiqo-frontend.vercel.app

Demo Accounts

๐Ÿš€ Installation

Prerequisites

Ensure you have the following installed:

  • Node.js (v14 or higher)
  • npm or yarn or pnpm
  • PostgreSQL (local or cloud instance)
  • Git

Step 1: Clone the Repository

git clone https://github.com/AKsamrat/critiqo.git
cd critiqo

Step 2: Install Dependencies

For the frontend:

# Navigate to frontend directory (if separate)
npm install
# or
yarn install
# or
pnpm install

For the backend:

# Navigate to backend directory (if separate)
npm install
# or
yarn install
# or
pnpm install

Step 3: Environment Configuration

Create a .env file in the root directory and add the following variables:

# Database Configuration
DATABASE_URL="postgresql://username:password@localhost:5432/critiqo"
DIRECT_URL="postgresql://username:password@localhost:5432/critiqo"

# JWT Configuration
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRES_IN="7d"

# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME="your-cloud-name"
CLOUDINARY_API_KEY="your-api-key"
CLOUDINARY_API_SECRET="your-api-secret"

# Application URLs
FRONTEND_URL="http://localhost:3000"
BACKEND_URL="http://localhost:5000"

# Payment Gateway (if applicable)
STRIPE_SECRET_KEY="your-stripe-secret-key"
STRIPE_PUBLISHABLE_KEY="your-stripe-publishable-key"

# Email Configuration (for notifications)
EMAIL_SERVICE="gmail"
EMAIL_USER="your-email@gmail.com"
EMAIL_PASS="your-app-password"

Step 4: Database Setup

# Generate Prisma client
npx prisma generate

# Run database migrations
npx prisma migrate dev

# Seed the database (if seed file exists)
npx prisma db seed

Step 5: Start the Development Server

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

The application will be available at http://localhost:3000

๐ŸŽฎ Usage

For Users

  1. Registration/Login: Create an account or sign in
  2. Browse Reviews: Explore product reviews by category
  3. Create Reviews: Share your product experiences
  4. Interact: Vote on reviews and leave comments
  5. Premium Content: Access exclusive premium reviews

For Admins

  1. Admin Dashboard: Access admin panel at /admin
  2. Content Moderation: Review and approve user submissions
  3. User Management: Manage user accounts and permissions
  4. Analytics: View platform statistics and insights

๐Ÿ“š API Documentation

Authentication Endpoints

POST /api/auth/register    - User registration
POST /api/auth/login       - User login
POST /api/auth/logout      - User logout
GET  /api/auth/profile     - Get user profile
PUT  /api/auth/profile     - Update user profile

Review Endpoints

GET    /api/reviews        - Get all reviews
POST   /api/reviews        - Create new review
GET    /api/reviews/:id    - Get specific review
PUT    /api/reviews/:id    - Update review
DELETE /api/reviews/:id    - Delete review

Category Endpoints

GET    /api/categories     - Get all categories
POST   /api/categories     - Create new category
PUT    /api/categories/:id - Update category
DELETE /api/categories/:id - Delete category

Interaction Endpoints

POST   /api/reviews/:id/vote    - Vote on review
POST   /api/reviews/:id/comment - Comment on review
GET    /api/comments/:id        - Get comment
PUT    /api/comments/:id        - Update comment
DELETE /api/comments/:id        - Delete comment

๐Ÿ“ Project Structure

critiqo/
โ”œโ”€โ”€ ๐Ÿ“ components/          # Reusable UI components
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ ui/             # Basic UI components
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ forms/          # Form components
โ”‚   โ””โ”€โ”€ ๐Ÿ“ layout/         # Layout components
โ”œโ”€โ”€ ๐Ÿ“ pages/              # Next.js pages
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ api/           # API routes
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ auth/          # Authentication pages
โ”‚   โ””โ”€โ”€ ๐Ÿ“ admin/         # Admin pages
โ”œโ”€โ”€ ๐Ÿ“ lib/               # Utility libraries
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ prisma.ts      # Prisma client
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ auth.ts        # Authentication utilities
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ utils.ts       # General utilities
โ”œโ”€โ”€ ๐Ÿ“ styles/            # CSS and styling files
โ”œโ”€โ”€ ๐Ÿ“ public/            # Static assets
โ”œโ”€โ”€ ๐Ÿ“ prisma/            # Database schema and migrations
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ schema.prisma  # Database schema
โ”‚   โ””โ”€โ”€ ๐Ÿ“ migrations/    # Database migrations
โ”œโ”€โ”€ ๐Ÿ“„ .env.example       # Environment variables template
โ”œโ”€โ”€ ๐Ÿ“„ package.json       # Dependencies and scripts
โ”œโ”€โ”€ ๐Ÿ“„ tailwind.config.js # Tailwind CSS configuration
โ”œโ”€โ”€ ๐Ÿ“„ next.config.js     # Next.js configuration
โ””โ”€โ”€ ๐Ÿ“„ README.md          # Project documentation

๐ŸŒ Environment Variables

Variable Description Required
DATABASE_URL PostgreSQL connection string Yes
JWT_SECRET Secret key for JWT tokens Yes
CLOUDINARY_CLOUD_NAME Cloudinary cloud name Yes
CLOUDINARY_API_KEY Cloudinary API key Yes
CLOUDINARY_API_SECRET Cloudinary API secret Yes
FRONTEND_URL Frontend application URL Yes
BACKEND_URL Backend API URL Yes
STRIPE_SECRET_KEY Stripe payment secret key Optional
EMAIL_USER Email service username Optional
EMAIL_PASS Email service password Optional

๐Ÿค Contributing

We welcome contributions to Critiqo! Please follow these steps:

  1. Fork the Repository

    git fork https://github.com/AKsamrat/critiqo.git
  2. Create a Feature Branch

    git checkout -b feature/your-feature-name
  3. Make Your Changes

    • Follow the existing code style
    • Add tests for new features
    • Update documentation as needed
  4. Commit Your Changes

    git commit -m "Add: your feature description"
  5. Push to Your Fork

    git push origin feature/your-feature-name
  6. Create a Pull Request

    • Provide a clear description of changes
    • Include screenshots if applicable
    • Reference any related issues

Development Guidelines

  • Use TypeScript for type safety
  • Follow ESLint and Prettier configurations
  • Write meaningful commit messages
  • Add appropriate comments to complex logic
  • Test your changes thoroughly

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“ž Contact

Developer: AKsamrat

Project Links


โญ Star this repository if you found it helpful!

Made with โค๏ธ by AKsamrat

About

A comprehensive platform for users to create accounts, share product reviews with ratings, categorize reviews, and interact with posts through voting and commenting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages