mockiapi 0.1.8

A flexible, feature-rich mock API server with an intuitive frontend that simplifies development.
Documentation
:root {
  --primary-color: #4f46e5;
  --secondary-color: #818cf8;
  --background-color: #f9fafb;
  --card-background: #ffffff;
  --text-color: #1f2937;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.registration-form,
.registered-endpoints {
  background-color: var(--card-background);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  flex: 1; /* Ensures both sections take equal space */
  min-height: 300px; /* Minimum height to avoid sections being too small */
  display: flex;
  flex-direction: column; /* Keeps content aligned in columns */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family), serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

textarea,
input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  font-size: 1rem;
}

small {
  display: block;
  color: #6b7280;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-group div {
  display: flex;
  align-items: center;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-danger {
  background-color: var(--error-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-danger:hover {
  opacity: 0.9;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  background-color: #f3f4f6;
}

.methods-list {
  display: flex;
  gap: 0.5rem;
}

.method-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background-color: #e0e7ff;
  color: var(--primary-color);
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 2s linear infinite;
  margin: 2rem auto;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.notification {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.25rem;
}

.notification.success {
  background-color: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.notification.error {
  background-color: #fee2e2;
  color: #b91c1c;
  border-left: 4px solid var(--error-color);
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: #6b7280;
}

/* Empty state styling */
.empty-state {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
}

.info-message {
  background-color: #e7f3fe;
  border-left: 6px solid #2196F3;
  padding: 10px;
  margin-bottom: 15px;
}

.disabled-method {
  color: #999;
}

.method-selected {
  font-weight: bold;
  color: #2196F3;
}

/* Tabs styling */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}