refactor: flatten monorepo structure to backend/ frontend/ devops/
Rename subdirectories for a cleaner single-repo layout: - website-monitoring-backend/ → backend/ - website-monitoring-frontend/ → frontend/ - website-monitoring-devops/ → devops/ Update all references in package.json scripts, CI workflows, docker-compose, pre-commit hooks, and documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
{ pkgs, ... }: {
|
||||
packages = with pkgs; [
|
||||
# Node.js and package managers
|
||||
nodejs_20
|
||||
yarn
|
||||
nodePackages.typescript
|
||||
nodePackages.typescript-language-server
|
||||
|
||||
# Database
|
||||
postgresql_15
|
||||
|
||||
# Development tools
|
||||
git
|
||||
curl
|
||||
jq
|
||||
|
||||
# Optional: Add Docker if you want to manage Docker services
|
||||
# docker
|
||||
# docker-compose
|
||||
];
|
||||
|
||||
# PostgreSQL service for local development
|
||||
services.postgres = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_15;
|
||||
initialDatabases = [{ name = "website_monitoring"; }];
|
||||
initialScript = ''
|
||||
CREATE USER website_monitoring WITH PASSWORD 'password';
|
||||
GRANT ALL PRIVILEGES ON DATABASE website_monitoring TO website_monitoring;
|
||||
'';
|
||||
};
|
||||
|
||||
# Optional: Add Redis if needed for caching/sessions
|
||||
# services.redis.enable = true;
|
||||
|
||||
# Environment variables
|
||||
env.POSTGRES_DB = "website_monitoring";
|
||||
env.POSTGRES_USER = "website_monitoring";
|
||||
env.POSTGRES_PASSWORD = "password";
|
||||
env.DATABASE_URL = "postgresql://website_monitoring:password@localhost:5432/website_monitoring";
|
||||
|
||||
# Scripts that run when entering the environment
|
||||
enterShell = ''
|
||||
echo "🚀 Website Monitoring Frontend Development Environment"
|
||||
echo "📦 Node.js $(node --version)"
|
||||
echo "🐘 PostgreSQL $(psql --version)"
|
||||
echo ""
|
||||
echo "Available commands:"
|
||||
echo " npm run dev - Start development server"
|
||||
echo " npm run build - Build for production"
|
||||
echo " npm run lint - Run ESLint"
|
||||
echo " psql - Connect to PostgreSQL"
|
||||
echo ""
|
||||
echo "Database connection:"
|
||||
echo " Host: localhost"
|
||||
echo " Port: 5432"
|
||||
echo " Database: website_monitoring"
|
||||
echo " User: website_monitoring"
|
||||
echo " Password: password"
|
||||
echo ""
|
||||
'';
|
||||
|
||||
# Pre-commit hooks (optional)
|
||||
# pre-commit.hooks.shellcheck.enable = true;
|
||||
# pre-commit.hooks.nixpkgs-fmt.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user