Skip to content

bv86/oursinet

Repository files navigation

🐻 Oursi.net

This repository contains the code for the oursi.net website (my personal website), a modern web application built with Next.js and Strapi CMS.

🚀 Project Overview

Oursi.net is a full-stack web application with:

  • 🖼️ Next.js frontend (v15) with TypeScript and Tailwind CSS
  • 🗄️ Strapi headless CMS (v5) with PostgreSQL database
  • 🐳 Docker containerization for easy deployment
  • 📦 PNPM workspace for efficient package management

📁 Project Structure

The project is organized as a monorepo with the following structure:

oursinet/
├── next/           # Next.js frontend application
├── cms/            # Strapi CMS backend
├── utils/          # Utility scripts for development
└── docker-compose.yml  # Docker configuration for local deployment

Frontend (Next.js)

The frontend is built with Next.js 15, featuring:

  • 🌐 Internationalization support
  • 🧩 Component-based architecture with reusable UI components
  • 📱 Responsive design with Tailwind CSS
  • 📄 Dynamic content rendering from Strapi

Backend (Strapi)

The backend uses Strapi CMS with:

  • 📊 PostgreSQL database for content storage
  • 🔒 User authentication and permissions
  • 📝 Content types for articles, pages, and global components
  • 🖼️ Media management for images and files

🛠️ Development Setup

Prerequisites

  • Node.js (v18 or newer)
  • PNPM (v10.5.2 or newer)
  • Docker and Docker Compose (for containerized setup)

Option 1: Local Development with PNPM

  1. Clone the repository

    git clone https://github.com/your-username/oursinet.git
    cd oursinet
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    # Create .env file in the cms directory
    cp cms/.env.example cms/.env
  4. Start PostgreSQL database

    docker-compose up postgres -d
  5. Start both development servers

    pnpm -r dev
  6. Access your applications:

Option 2: Docker Compose (Full Stack)

For testing the entire application in a production-like environment:

  1. Clone the repository

    git clone https://github.com/your-username/oursinet.git
    cd oursinet
  2. Set up environment variables

    cp cms/.env.example cms/.env
  3. Build and start all services

    docker-compose up -d
  4. Access your containerized applications:

🧰 Useful Commands

PNPM Commands

# Install all dependencies
pnpm install

# Lint all projects
pnpm lint

# Format all projects
pnpm format

# Fix linting issues
pnpm lint:fix

# Fix formatting issues
pnpm format:fix

Next.js Commands (in next/ directory)

# Start development server with turbopack
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

Strapi Commands (in cms/ directory)

# Start development server
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

Database Utilities (in utils/ directory)

# Port-forward database (if needed)
./utils/port-forward.sh

# Sync database with latest dump
./utils/sync-db.sh

✨ Author

Created by Benoit VANNESSON.

About

Source code of my personal website oursi.net

Resources

Stars

Watchers

Forks