chore(release): clean up repo for v0.0.1 release

Excluded from release bundle:
- CONTEXT.md, CHANGELOG.md (agent/project working notes)
- client-app/ (React Native messenger — tracked separately)
- contracts/hello_go/ (unused standalone example)

Kept contracts/counter/ and contracts/name_registry/ as vm-test fixtures
(referenced by vm/vm_test.go; NOT production contracts).

Docs refactor:
- docs/README.md — new top-level index with cross-references
- docs/quickstart.md — rewrite around single-node as primary path
- docs/node/README.md — full rewrite, all CLI flags, schema table
- docs/api/README.md — add /api/well-known-version, /api/update-check
- docs/contracts/README.md — split native (Go) vs WASM (user-deployable)
- docs/update-system.md — new, full 5-layer update system design
- README.md — link into docs/, drop CHANGELOG/client-app references

Build-time version system (inherited from earlier commits this branch):
- node --version / client --version with ldflags-injected metadata
- /api/well-known-version with {build, protocol_version, features[]}
- Peer-version gossip on dchain/version/v1
- /api/update-check against Gitea release API
- deploy/single/update.sh with semver guard + 15-min systemd jitter
This commit is contained in:
vsecoder
2026-04-17 14:37:00 +03:00
parent 7e7393e4f8
commit 546d2c503f
55 changed files with 702 additions and 17381 deletions

View File

@@ -1,37 +0,0 @@
import React from 'react';
import { View, Text } from 'react-native';
import { cn } from '@/lib/utils';
/** Deterministic color from a string */
function colorFor(str: string): string {
const colors = [
'bg-blue-600', 'bg-purple-600', 'bg-green-600',
'bg-pink-600', 'bg-orange-600', 'bg-teal-600',
'bg-red-600', 'bg-indigo-600', 'bg-cyan-600',
];
let h = 0;
for (let i = 0; i < str.length; i++) h = (h * 31 + str.charCodeAt(i)) >>> 0;
return colors[h % colors.length];
}
interface AvatarProps {
name?: string;
size?: 'sm' | 'md' | 'lg';
className?: string;
}
const sizeMap = {
sm: { outer: 'w-8 h-8', text: 'text-sm' },
md: { outer: 'w-10 h-10', text: 'text-base' },
lg: { outer: 'w-14 h-14', text: 'text-xl' },
};
export function Avatar({ name = '?', size = 'md', className }: AvatarProps) {
const initials = name.slice(0, 2).toUpperCase();
const { outer, text } = sizeMap[size];
return (
<View className={cn(outer, colorFor(name), 'rounded-full items-center justify-center', className)}>
<Text className={cn(text, 'text-white font-bold')}>{initials}</Text>
</View>
);
}

View File

@@ -1,24 +0,0 @@
import React from 'react';
import { View, Text } from 'react-native';
import { cn } from '@/lib/utils';
interface BadgeProps {
label: string | number;
variant?: 'default' | 'success' | 'destructive' | 'muted';
className?: string;
}
const variantMap = {
default: 'bg-primary',
success: 'bg-success',
destructive: 'bg-destructive',
muted: 'bg-surfaceHigh border border-border',
};
export function Badge({ label, variant = 'default', className }: BadgeProps) {
return (
<View className={cn('rounded-full px-2 py-0.5 items-center justify-center', variantMap[variant], className)}>
<Text className="text-white text-xs font-semibold">{label}</Text>
</View>
);
}

View File

@@ -1,76 +0,0 @@
import React from 'react';
import { Pressable, Text, ActivityIndicator } from 'react-native';
import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '@/lib/utils';
const buttonVariants = cva(
'flex-row items-center justify-center rounded-xl px-5 py-3 active:opacity-80',
{
variants: {
variant: {
default: 'bg-primary',
secondary: 'bg-surfaceHigh border border-border',
destructive: 'bg-destructive',
ghost: 'bg-transparent',
outline: 'bg-transparent border border-primary',
},
size: {
sm: 'px-3 py-2',
md: 'px-5 py-3',
lg: 'px-6 py-4',
icon: 'p-2',
},
},
defaultVariants: {
variant: 'default',
size: 'md',
},
},
);
const textVariants = cva('font-semibold text-center', {
variants: {
variant: {
default: 'text-white',
secondary: 'text-white',
destructive: 'text-white',
ghost: 'text-primary',
outline: 'text-primary',
},
size: {
sm: 'text-sm',
md: 'text-base',
lg: 'text-lg',
icon: 'text-base',
},
},
defaultVariants: {
variant: 'default',
size: 'md',
},
});
interface ButtonProps extends VariantProps<typeof buttonVariants> {
onPress?: () => void;
disabled?: boolean;
loading?: boolean;
children: React.ReactNode;
className?: string;
}
export function Button({
variant, size, onPress, disabled, loading, children, className,
}: ButtonProps) {
return (
<Pressable
onPress={onPress}
disabled={disabled || loading}
className={cn(buttonVariants({ variant, size }), disabled && 'opacity-50', className)}
>
{loading
? <ActivityIndicator color="#fff" size="small" />
: <Text className={textVariants({ variant, size })}>{children}</Text>
}
</Pressable>
);
}

View File

@@ -1,16 +0,0 @@
import React from 'react';
import { View } from 'react-native';
import { cn } from '@/lib/utils';
interface CardProps {
children: React.ReactNode;
className?: string;
}
export function Card({ children, className }: CardProps) {
return (
<View className={cn('bg-surface border border-border rounded-2xl p-4', className)}>
{children}
</View>
);
}

View File

@@ -1,34 +0,0 @@
import React, { forwardRef } from 'react';
import { TextInput, View, Text, type TextInputProps } from 'react-native';
import { cn } from '@/lib/utils';
interface InputProps extends TextInputProps {
label?: string;
error?: string;
className?: string;
}
export const Input = forwardRef<TextInput, InputProps>(
({ label, error, className, ...props }, ref) => (
<View className="w-full gap-1">
{label && (
<Text className="text-muted text-sm font-medium mb-1">{label}</Text>
)}
<TextInput
ref={ref}
placeholderTextColor="#8b949e"
className={cn(
'bg-surfaceHigh border border-border rounded-xl px-4 py-3 text-white text-base',
error && 'border-destructive',
className,
)}
{...props}
/>
{error && (
<Text className="text-destructive text-xs mt-1">{error}</Text>
)}
</View>
),
);
Input.displayName = 'Input';

View File

@@ -1,7 +0,0 @@
import React from 'react';
import { View } from 'react-native';
import { cn } from '@/lib/utils';
export function Separator({ className }: { className?: string }) {
return <View className={cn('h-px bg-border my-2', className)} />;
}

View File

@@ -1,6 +0,0 @@
export { Button } from './Button';
export { Card } from './Card';
export { Input } from './Input';
export { Avatar } from './Avatar';
export { Badge } from './Badge';
export { Separator } from './Separator';