-- Database Migration Plan
CREATE TABLE organizations (
id uuid PRIMARY KEY,
name text NOT NULL,
subscription_plan text DEFAULT 'freemium',
created_at timestamp with time zone
);
CREATE TABLE products (
id uuid PRIMARY KEY,
name text NOT NULL,
thickness numeric NOT NULL,
sale_price numeric NOT NULL,
organization_id uuid REFERENCES organizations(id)
);
CREATE TABLE calculators (
id uuid PRIMARY KEY,
name text NOT NULL,
customer_name text NOT NULL,
status text DEFAULT 'active'
);
-- Enable Row Level Security
ALTER TABLE products ENABLE ROW LEVEL SECURITY;
CREATE POLICY "users_view_org_products" ON products
FOR SELECT USING (organization_id IN (
SELECT organization_id FROM profiles WHERE id = auth.uid()
));
-- Create Indexes
CREATE INDEX idx_products_org ON products(organization_id);
CREATE INDEX idx_calculators_org ON calculators(organization_id);
-- Migration Statistics
-- Total Tables: 27
-- Total Indexes: 94
-- RLS Policies: 58
-- Extensions: 6
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
-- Core Functions
CREATE OR REPLACE FUNCTION handle_updated_at()
RETURNS trigger AS $$
BEGIN
new.updated_at = TIMEZONE('utc', NOW());
RETURN new;
END;
$$ LANGUAGE plpgsql;
-- Triggers
CREATE TRIGGER update_quotes_updated_at
BEFORE UPDATE ON quotes
FOR EACH ROW EXECUTE FUNCTION handle_updated_at();Norges første ERP for beslagbransjen
Kalkuler, fakturer og administrer – alt i én plattform
-- ERP Solution Components CREATE TABLE customers (id uuid, name text, email text); CREATE TABLE quotes (id uuid, customer_id uuid, total numeric); CREATE TABLE invoices (id uuid, quote_id uuid, status text); CREATE TABLE products (id uuid, name text, price numeric); CREATE TABLE operations (id uuid, name text, cost numeric); -- Business Logic FUNCTION calculate_quote_total(quote_id uuid) RETURNS numeric; FUNCTION generate_invoice(quote_id uuid) RETURNS uuid; FUNCTION track_customer_history(customer_id uuid) RETURNS jsonb; -- Integration Points API: /api/quotes/create API: /api/invoices/generate API: /api/customers/sync
Alt du trenger for å drive din beslagbedrift effektivt, fra kundestyring til ferdig levering
Alle kunder, kontakter og adresser i ett system. Velg direkte fra kundelisten når du lager kalkyle, sender tilbud eller fakturerer. Ingen e-post-jakt, ingen notater som forsvinner.
-- Customer Success Metrics SELECT COUNT(*) as active_companies FROM organizations; SELECT COUNT(*) as active_calculators FROM calculators; SELECT COUNT(*) as generated_quotes FROM quotes; SELECT AVG(rating) as avg_rating FROM customer_feedback; -- Trust Indicators 55+ Norwegian Companies • 136 Active Calculators 81 Professional Quotes • 35 Registered Users 4.8/5 Average Rating • 98% Customer Satisfaction -- Social Proof Data Industry: Beslag Production Region: Norway Platform: VBESLAG ERP Solution
Stolt brukt av ledende norske beslagbedrifter
-- Pricing Plans Configuration
PLAN freemium {
calculators: 10,
products: 100,
customers: 5,
team_members: 2,
price: 0 NOK/month
}
PLAN premium {
calculators: unlimited,
products: unlimited,
customers: unlimited,
team_members: unlimited,
price: 349 NOK/month,
features: [priority_support, advanced_features]
}
-- Billing Logic
FUNCTION calculate_monthly_cost(plan text) RETURNS numeric;
FUNCTION check_usage_limits(org_id uuid) RETURNS jsonb;Start gratis i dag, oppgrader når du trenger mer
Perfekt for små beslagbedrifter som kommer i gang
Ubegrenset bruk for voksende bedrifter
Alle priser er eks. MVA. Fakturering håndteres av Stripe med norsk krone.
-- Customer Testimonials & Reviews SELECT author, company, rating, feedback FROM testimonials; SELECT AVG(rating) as avg_rating FROM customer_reviews; SELECT COUNT(*) as total_reviews FROM feedback WHERE verified = true; -- Trust Metrics 55+ Companies Trust VBESLAG 4.8/5 Average Rating 98% Customer Satisfaction 136 Active Users -- Customer Feedback "Revolusjonert vår kalkulering" - Ole Hansen "Fikk oss raskt i gang" - Kari Olsen "Best ERP solution" - Industry Leaders
"VBESLAG har revolusjonert hvordan vi kalkulerer beslagarbeider. Ingen flere manuelle feil og tilbudene ser profesjonelle ut."
"Den guidede oppstartsopplevelsen fikk oss raskt i gang. Nå bruker hele teamet VBESLAG hver dag."
-- Frequently Asked Questions Q: How accurate are calculations? A: Industry-standard pricing with 25% Norwegian VAT Q: Can I customize pricing? A: Yes, configure operations, discounts, and rates Q: Do you support thermal printers? A: Yes, A4 PDF and 80mm thermal receipts Q: What happens at freemium limits? A: Clear warnings, upgrade anytime to premium Q: Where is the app? A: Web-based, works in all modern browsers Q: What after trial period? A: Continue freemium or upgrade, no data loss Q: Credit card required? A: No, start free, 100% commitment-free
-- Final Call to Action ACTION: Start Free Trial BENEFIT: 80% Faster Calculations COMMITMENT: No Credit Card Required GUARANTEE: 30-Day Money Back -- Registration Flow STEP 1: Create Account (Free) STEP 2: Explore Features STEP 3: Generate First Quote STEP 4: Upgrade When Ready -- Value Proposition Transform Your Business Today Reduce Calculation Time by 80% Professional Quotes in Minutes Start Free, Scale as You Grow
Start din gratis prøveperiode i dag og se hvordan VBESLAG reduserer kalkuleringstid med 80%. Ingen kredittkort nødvendig - 100% uforpliktende.
🚀 Start i dag • Ingen bindingstid • 30 dagers pengene-tilbake-garanti