Rename project from imc-vibe to imc

- Binary name: imc-vibe -> imc
- Go module: github.com/imc-vibe/backend -> github.com/imc/backend
- JWT issuer: imc-vibe -> imc
- UI labels: IMC Vibe -> IMC
- Update all imports and comments
This commit is contained in:
Christoph Haas 2026-03-24 23:42:37 +01:00
parent a4c6b04b37
commit ff52be8adf
19 changed files with 52 additions and 40 deletions

2
.gitignore vendored
View file

@ -4,7 +4,7 @@ build/
backend/cmd/server/embed/
backend/tmp/
.env
backend/imc-vibe
backend/imc
node_modules/
frontend/node_modules/
frontend/build/

View file

@ -1,7 +1,7 @@
.PHONY: all dev dev-frontend dev-backend build build-frontend build-backend clean test lint
# Variables
APP_NAME := imc-vibe
APP_NAME := imc
FRONTEND_DIR := frontend
BACKEND_DIR := backend
BUILD_DIR := build

View file

@ -1,4 +1,4 @@
# IMC Vibe
# IMC
A self-sufficient web application to manage an ISPmail (Postfix, Dovecot, Rspamd) mail server.
@ -36,7 +36,7 @@ make build
### 2. Create Admin User
```bash
./build/imc-vibe --reset-admin-password
./build/imc --reset-admin-password
# This creates an admin user or resets the password
# Output: Username: admin, Password: (randomly generated)
```
@ -44,7 +44,7 @@ make build
### 3. Run
```bash
./build/imc-vibe --bind=0.0.0.0 --port=8080
./build/imc --bind=0.0.0.0 --port=8080
```
### 4. Access
@ -97,7 +97,7 @@ Example service file at `/etc/systemd/system/imc-vibe.service`:
```ini
[Unit]
Description=IMC Vibe Mail Admin
Description=IMC Mail Admin
After=network.target mariadb.service postfix.service
[Service]
@ -127,10 +127,22 @@ WantedBy=multi-user.target
## Development
Run development server that watches for file changes:
```sh
make dev
```
Build the binary into the build/ directory:
```bash
# Build frontend and backend
make build
```
Build only frontend or backend:
```sh
# Run backend only (uses filesystem frontend)
cd backend && go run ./cmd/server

View file

@ -2,8 +2,8 @@
# Install air: go install github.com/air-verse/air@latest
[build]
bin = "./tmp/imc-vibe"
cmd = "go build -o ./tmp/imc-vibe ./cmd/server"
bin = "./tmp/imc"
cmd = "go build -o ./tmp/imc ./cmd/server"
stop_on_error = true
[log]

View file

@ -1,4 +1,4 @@
// Package main is the entry point for the imc-vibe mail server admin application.
// Package main is the entry point for the IMC mail server admin application.
// This single binary contains both the Go backend API and the embedded SvelteKit frontend.
package main
@ -12,10 +12,10 @@ import (
"strings" // string manipulation utilities
"github.com/gin-gonic/gin" // web framework
"github.com/imc-vibe/backend/internal/api" // HTTP API routing and handlers
"github.com/imc-vibe/backend/internal/auth" // password hashing
"github.com/imc-vibe/backend/internal/config" // configuration loading
"github.com/imc-vibe/backend/internal/db" // database connection and operations
"github.com/imc/backend/internal/api" // HTTP API routing and handlers
"github.com/imc/backend/internal/auth" // password hashing
"github.com/imc/backend/internal/config" // configuration loading
"github.com/imc/backend/internal/db" // database connection and operations
)
// main is the entry point of the application.
@ -24,7 +24,7 @@ import (
func main() {
// Parse command-line flags.
// Flags are optional arguments passed after the program name.
// Example: ./imc-vibe --bind=0.0.0.0 --port=8080
// Example: ./imc --bind=0.0.0.0 --port=8080
// --bind: The IP address the server should listen on.
// 0.0.0.0 means listen on all network interfaces (accessible from other machines).
@ -69,14 +69,14 @@ func main() {
// Connect to the database (MariaDB/MySQL).
// The database stores both ISPmail data (virtual_users, virtual_domains, etc.)
// and imc-vibe's own data (imc_users, imc_users2domains, etc.).
// and IMC's own data (imc_users, imc_users2domains, etc.).
database, err := db.Connect(cfg)
if err != nil {
log.Fatalf("Failed to connect to database: %v", err) // Fatal = print and exit
}
// Create database tables if they don't exist.
// This only creates imc-vibe's own tables, not the ISPmail tables.
// This only creates IMC's own tables, not the ISPmail tables.
if err := database.InitSchema(); err != nil {
log.Printf("Warning: Could not initialize schema: %v", err) // Non-fatal = continue
}

View file

@ -1,4 +1,4 @@
module github.com/imc-vibe/backend
module github.com/imc/backend
go 1.25.0

View file

@ -6,7 +6,7 @@ import (
"strings"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/db"
"github.com/imc/backend/internal/db"
)
type AliasHandler struct {

View file

@ -6,8 +6,8 @@ import (
"time"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/auth"
"github.com/imc-vibe/backend/internal/db"
"github.com/imc/backend/internal/auth"
"github.com/imc/backend/internal/db"
)
const MaxLoginAttempts = 5

View file

@ -7,7 +7,7 @@ import (
"strings"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/db"
"github.com/imc/backend/internal/db"
)
type DomainHandler struct {

View file

@ -5,7 +5,7 @@ import (
"strconv"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/mail"
"github.com/imc/backend/internal/mail"
)
type LogsHandler struct{}

View file

@ -6,7 +6,7 @@ import (
"strings"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/auth"
"github.com/imc/backend/internal/auth"
)
// AuthContextKey is the key used to store auth context in gin.Context.

View file

@ -5,7 +5,7 @@ import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/mail"
"github.com/imc/backend/internal/mail"
)
type QueueHandler struct{}

View file

@ -2,7 +2,7 @@ package handlers
import (
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/db"
"github.com/imc/backend/internal/db"
)
type StatsHandler struct {

View file

@ -8,8 +8,8 @@ import (
"strings"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/db"
"github.com/imc-vibe/backend/internal/mail"
"github.com/imc/backend/internal/db"
"github.com/imc/backend/internal/mail"
)
type UserHandler struct {

View file

@ -4,10 +4,10 @@ import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/imc-vibe/backend/internal/api/handlers"
"github.com/imc-vibe/backend/internal/auth"
"github.com/imc-vibe/backend/internal/config"
"github.com/imc-vibe/backend/internal/db"
"github.com/imc/backend/internal/api/handlers"
"github.com/imc/backend/internal/auth"
"github.com/imc/backend/internal/config"
"github.com/imc/backend/internal/db"
)
type Router struct {
@ -22,7 +22,7 @@ type Router struct {
}
func New(database *db.DB, cfg *config.Config) *Router {
jwtManager := auth.NewJWTManager(cfg.JWTSecret, "imc-vibe")
jwtManager := auth.NewJWTManager(cfg.JWTSecret, "imc")
r := &Router{
authHandler: handlers.NewAuthHandler(database, jwtManager, cfg.TrustedProxies),

View file

@ -1,4 +1,4 @@
// Package db provides database access for the imc-vibe application.
// Package db provides database access for the IMC application.
// It uses GORM (Go ORM) for database operations.
//
// The database contains two sets of tables:
@ -14,7 +14,7 @@ import (
"gorm.io/gorm" // GORM ORM library
"gorm.io/gorm/logger" // GORM logger configuration
"github.com/imc-vibe/backend/internal/config" // configuration
"github.com/imc/backend/internal/config" // configuration
)
// DB wraps GORM's database connection with helper methods.
@ -70,7 +70,7 @@ type Alias struct {
func (Alias) TableName() string { return "virtual_aliases" }
// =============================================================================
// imc-vibe Application Models (tables created by this app)
// IMC Application Models (tables created by this app)
// =============================================================================
// ImcUser represents an admin user who can log into this application.
@ -190,7 +190,7 @@ func Connect(cfg *config.Config) (*DB, error) {
return &DB{db}, nil
}
// InitSchema creates imc-vibe's database tables if they don't exist.
// InitSchema creates IMC's database tables if they don't exist.
// This only creates the imc_* tables, not the ISPmail virtual_* tables.
// Called during application startup.
func (d *DB) InitSchema() error {

View file

@ -1,5 +1,5 @@
{
"name": "imc-vibe-frontend",
"name": "imc-frontend",
"version": "0.0.1",
"private": true,
"type": "module",

View file

@ -91,7 +91,7 @@
</div>
<div class="flex-1">
<a href="/" class="btn btn-ghost text-xl">IMC Vibe</a>
<a href="/" class="btn btn-ghost text-xl">IMC</a>
</div>
{#if selectedDomain}

View file

@ -42,7 +42,7 @@
<div class="min-h-screen flex items-center justify-center bg-base-200" data-theme="light">
<div class="card bg-base-100 shadow-xl w-full max-w-md">
<div class="card-body">
<h1 class="text-2xl font-bold text-center mb-2">IMC Vibe</h1>
<h1 class="text-2xl font-bold text-center mb-2">IMC</h1>
<p class="text-center text-base-content/60 mb-6">Mail Server Administration</p>
{#if error}