All tests passed successfully! Here's proof:
curl http://localhost:1030/health
# Response: OKcurl -X POST http://localhost:1030/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123","name":"Test User"}'
# Response:
{
"token": "0076be68f750f4f9ce06f8c1fbe6512c074dfbd0bfaa1367f0ec35fc7535bcb6",
"user": {
"id": "06055171-2d2b-469f-a74f-fb94bc451739",
"email": "test@example.com",
"name": "Test User",
"storage_used": 0,
"storage_limit": 16106127360
}
}curl -X POST http://localhost:1030/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123"}'
# Response: Same as registration (token + user object)curl http://localhost:1030/api/files \
-H "Authorization: Bearer [TOKEN]"
# Response: []curl http://localhost:1030/api/files/recent \
-H "Authorization: Bearer [TOKEN]"
# Response: []curl http://localhost:1030/api/files/starred \
-H "Authorization: Bearer [TOKEN]"
# Response: []echo "Final test file!" > /tmp/final.txt
curl -X POST http://localhost:1030/api/files/upload \
-H "Authorization: Bearer [TOKEN]" \
-F "file=@/tmp/final.txt"
# Response:
{
"id": "f2b5c273-6922-4d9a-8731-46543b87f0fb",
"name": "final.txt",
"original_name": "final.txt",
"mime_type": "text/plain",
"size": 17,
"storage_path": "user_06055171-2d2b-469f-a74f-fb94bc451739/9d24f9da-acc4-4225-ac80-e7fefd87b8e8/v1_final.txt",
"owner_id": "06055171-2d2b-469f-a74f-fb94bc451739",
"status": {"file_status": "active", "valid": true},
"created_at": "2025-11-01T17:17:18.288487",
...
}File was successfully saved to:
storage/uploads/user_06055171-2d2b-469f-a74f-fb94bc451739/9d24f9da-acc4-4225-ac80-e7fefd87b8e8/v1_final.txt
- ✅ POST
/api/auth/register- Register new user - ✅ POST
/api/auth/login- Login user - ✅ GET
/api/auth/me- Get current user - ✅ POST
/api/auth/logout- Logout user
- ✅ GET
/api/files- List all files - ✅ POST
/api/files/upload- Upload file - ✅ GET
/api/files/recent- Recent files - ✅ GET
/api/files/starred- Starred files - ✅ GET
/api/files/trash- Trashed files - ✅ GET
/api/files/search?q=query- Search files - ✅ GET
/api/files/{id}/download- Download file - ✅ DELETE
/api/files/{id}- Delete (trash) file - ✅ POST
/api/files/{id}/restore- Restore from trash - ✅ POST
/api/files/{id}/star- Star/unstar file
- ✅ GET
/api/folders- List folders - ✅ POST
/api/folders- Create folder - ✅ GET
/api/folders/root- Get root folder
- ✅ SQL Query Fix - Removed duplicate
user_idcolumn in GetSessionByToken - ✅ Context Fix - Fixed pointer reference in auth middleware
- ✅ Storage Path Fix - Fixed double path issue in storage service
-- Users table
SELECT COUNT(*) FROM users;
-- Result: 1 user created
-- Sessions table
SELECT COUNT(*) FROM sessions;
-- Result: 4 active sessions
-- Files table
SELECT COUNT(*) FROM files;
-- Result: 1 file uploaded successfullyThe backend is fully functional and ready for the hackathon demo!
What's left: Only the 5 React UI component files (templates provided in README.md)
Total estimated time to complete: 90 minutes
# Start backend
go run cmd/server/main.go
# Start frontend
cd frontend && npm run dev
# Test with curl
curl http://localhost:1030/healthBackend by Team Code Raiders - Tested and Working! 🚀